How do I programmatically create an entity reference in hook_entity_info()?
You can attach this field like any other:

function MY_MODULE_install() {
  // Create a field for company reference to be used by various entities
  $field = array(
    'field_name' =&gt; 'company_reference',
    'type' =&gt; 'entityreference',
    'settings' =&gt; array(
      'target_type' =&gt; 'company',
      'handler_settings' =&gt; array('target_bundles' =&gt; NULL),
    ),
    'cardinality' =&gt; 1,
    'translatable' =&gt; FALSE,
  );
  field_create_field($field);

  // Attach the company reference field to employee instance
  $instance = array(
    'field_name' =&gt; 'company_reference',
    'entity_type' =&gt; 'employee',
    'bundle' =&gt; 'employee',
    'label' =&gt; 'Company',
    'required' =&gt; false,
    'widget' =&gt; array(
      'type' =&gt; 'options_select'
    ),
    'settings' =&gt; array(
      'target_type' =&gt; 'company',
      'handler_settings' =&gt; array('target_bundles' =&gt; NULL),
    ),
    'display' =&gt; array(
      'default' =&gt; array('label' =&gt; 'inline', 'type' =&gt; 'entityreference_label'),
    ),
  );
  field_create_instance($instance);
}


Code sample taken from this more comprehensive manual.