Om

The Entity Browser module provides a generic entity browser/picker/selector. It can be used in any context where one needs to select a few entities and do something with them. For more information, see the online documentation for Entity Browser.

Bruker

General
Entity browser comes with an example module that can be used as a starting point.
Example use cases
Powerfull entity reference widget
Embedding entities into wysiwyg