How do programmatically create fields for content types, and ADD them to the the content type form
You're almost there.

From your code:

'bundle' =&gt; 'my_content_type',


Replace my_content_type with the name of the content type you want it attached to.

Here's a full example of adding a Alias text field to the Article content type. (from monarchdigital.com)

/**
 * Update hook to add a field to a node.
 */
function my_module_update_7000() {
  $field_name = 'field_alias';
  // Make sure the field doesn't already exist.
  if (!field_info_field($field_name)) {
    // Create the field.
    $field = array(
      'field_name' =&gt; $field_name,
      'type' =&gt; 'text',
      'settings' =&gt; array('max_length' =&gt; 64),
    );
    field_create_field($field);

    // Create the instance.
    $instance = array( 'field_name' =&gt; $field_name,
      'entity_type' =&gt; 'node',
      'bundle' =&gt; 'article',
      'label' =&gt; 'Alias',
      'description' =&gt; 'The article alias.',
      'required' =&gt; TRUE,
    );
    field_create_instance($instance);

    watchdog('my_module', t('!field_name was added successfully.', array('!field_name' =&gt; $field_name)));
  }
  else {
    watchdog('my_module', t('!field_name already exists.', array('!field_name' =&gt; $field_name)));
  }
}