Editing a Field Collection element in a custom module
Strictly speaking on how to edit a field collection entity, once you have the field collection ID (you would get it from a field on your host entity, for example), you can load the collection using entity_metadata_wrapper, change it and them save it back.


$collection = entity_metadata_wrapper('field_collection_item', $collection_id);
// Do your change
// ...
$collection->save();