Insert a custom field into a shortcode and use it in post(s)

As I already stated in comments, extract() should never be used. It was removed from core and the codex for very specific reasons and the use there of is strictly not recommended in future applications and functions. Please see trac ticket #22400 for complete details.

As stated before, the codex was also updated accordingly, so you can look at the examples given in the Shortcode API on how to construct a proper shortcode.

With this all in mind, you can create your shortcode as follows:

function get_my_custom_field( $atts ) {
    $attributes = shortcode_atts( array(
        'field' => '';
    ), $atts );

    global $post;

    if ( empty( $attributes['field'] ) )
      return null;

    return get_post_meta( $post->ID, $attributes['field'], true );
}
add_shortcode( 'insert-custom-field', 'get_my_custom_field' );

EDIT

You will maybe want to sanitize the input as well according to your input. I will leave that up to you as I’m not exactly sure which data will be passed