How to import entities?
it all depends on what functionality your entity provides. are you defining entity yourself or are you using some other module?

anyway simplest way is to create entity manually 

$entity = entity_get_controller($entity_type)-&gt;create(array('bundle' =&gt; $bundle_type));//this could look this way -&gt;create($bundle_type); depending on your constructor 

$entity-&gt;your_field['und'] = $value;//assuming you don't use entity translation then language is und

entity_get_controller($entity_type)-&gt;save($entity);


in case your controller extends EntityAPIControllerExportable then you could use import/export  but if you importing from external source probably custom code would be easier