How to add custom theme to module block on Drupal 7? I saw lot of questions and answers on this but I can't find solution.
I need to show last posts trough tpl file and I can't figure how to do it.
Also I don't know what to put in my tpl file. 

Edit!:
This is my hook_block_view () function and if I send data at the end of it like theme('item_list', ... it works perfectly. But I need to send it to my custom tpl file and when I do that it won't properly display list. I think that there is problem in .tpl file.

&lt;?php
function last_5_user_posts_block_view($delta = '') {
$block = array();

switch ($delta) {
case 'last_5_user_posts':

  // Capture the image file path and form into HTML with attributes
$image_file = file_load(variable_get('last_5_user_post_image', ''));
$image_path = '';

if (isset($image_file-&gt;uri)) {
$image_path = $image_file-&gt;uri;
}

$image = theme_image(array(
    'path' =&gt; ($image_path),
    'alt' =&gt; t('Image description here.'),
    'attributes' =&gt; array('class' =&gt; 'class_name'),
    'width' =&gt; '12',
    'height' =&gt; '12',
    ));

  $block['subject'] = t('My last posts');
  if (user_access('access content')) {
    // Use our custom function to retrieve data.
    $result = last_5_user_posts_contents();
    // Array to contain items for the block to render.
    $items = array();
    // Iterate over the resultset and format as links.
    foreach ($result as $node) {
      $items[] = array(
        'data' =&gt; $image.l($node-&gt;title, 'node/' . $node-&gt;nid),
      );
    }
   // If there is no nodes
    if (empty($items)) {
      $block['content'] = t('No posts available.');
    }
    else {
      // Pass data through theme function.
   //   $block['content'] = theme('last_5_user_posts_output', array(
   //       'items' =&gt; $items));
        $govno = 'Govno!';
        $listitems = array('items' =&gt; $items);
      $block['content'] = theme('last_5_user_posts_output', array(
          'items' =&gt; $items));
    }
  }

  return $block;

}

}


And my .tpl file for now contain just:

 &lt;div class="field-items"&lt;?php print $content_attributes; ?&gt;&gt;
 &lt;ol style="list-style: circle"&gt;
 &lt;?php foreach ($items as $delta =&gt; $item): ?&gt;
 &lt;li&gt;
 &lt;div class="field-item" style="color: red;"&gt;&lt;?php print render($item); ?&gt;&lt;/div&gt;
 &lt;/li&gt;
 &lt;?php endforeach; ?&gt;
 &lt;/ol&gt;
&lt;/div&gt;


If I create array:

$test[1] = 'Test!';
$test[2] = 'Test2!';
$test[3] = 'Test3!';


And send it trough $block['content'] like this

$block['content'] = theme('last_5_user_posts_output', array(
          'test' =&gt; $test));


It works pefectly!
But for $items it won't work. How to optimize $items to get it in .tlp??
Was too long for a comment...

If all you want is the last 5 posts of the current user - create a view:


choose content type
Create a limit under Pager (presumably of 5)
advanced - relationship author
filter by currently logged in user
sort by post date descending


This will create a view (be it a page or block) that shows the last 5 posts of whatever content you want for the currently logged in user. If you want to include it as a block, create as a block, and in the block configuration for that view (under structure/blocks), you can decide where on the page and for which pages you want the block to appear.

You can decide which content types are included via the filter, and decide the layout.