How do i use views with a custom entity?
If you used entity API module, then this is done pretty much out of the box, see my blogpost on Integrating entities with Views for more details.

If you didn't use entity API module or don't want to, you can make the views integration yourself using hook_views_data.