Render with custom style all contents of a content-type from custom module
If you want to just use the views module.  Set your view to use fields.  Filter by content type and set your display to using HTML List style.  Pickout the fields you want to display (Image, Title).  You can then add your custom javascript through a module or your theme so that it actually runs as a slideshow.

There are other modules that can handle this as well like views_slideshow and owlcarousel.

If you want to keep the code all in your own module, you may want to take a look at this article:

http://www.sitepoint.com/building-drupal-7-module-show-latest-nodes/

It shows you how to create your block, how to query the database, how to use the theme('item_list', $theme_args).  It should be straightforward.