How to create a module that shows some fields of profile2 type? I want to create a module that shows some fields of profile2 type, in fact I want to show some information about any user in profile page of theme.
Profile2 type is "stores", field machine name is "field_store_name" and my module name is "profile_header".
I put below code in profile_header.module

 &lt;?php  
function profile_header_block_info() {
  return array(
    'profile_header' =&gt; array(
      'info' =&gt; 'profile stores header',
      'cache' =&gt; DRUPAL_NO_CACHE
    )
  );
}

function profile_header_block_view($delta = '') {
  $block = array();

    global $user;
    $account = user_load($user-&gt;uid);
    $user_fields = user_load($uid);
    $profile = profile2_load_by_user($account, $stores = NULL);
    $field_store_name = field_get_items('profile2', $profile2['stores'], 'field_store_name'); 
    $block['subject'] = 'profile stores header ';
    $block['content'] =  theme(
          'profile_header',
          array(
            'field_store_name' =&gt; $field_store_name,               
          )
        );   
     return $block;      
}

function profile_header_theme($existing, $type, $theme, $path) {
  return array(
    'profile_header' =&gt; array(
      'template' =&gt; 'profile_header',
      'path' =&gt; $path . '/theme',
      'variable' =&gt; array(
        'user_fields' =&gt; NULL,   
      ),
    ),

  );
}


and put below code in profile_header.tpl.php, and clearly I put this file in profile_header/theme directory.

&lt;?php
?&gt;

&lt;section class="container"&gt; 
    &lt;aside class="store-bio"&gt;
        &lt;div class="store-name"&gt;
            &lt;?php print $field_store_name ; ?&gt;
        &lt;/div&gt;
    &lt;/aside&gt;
 &lt;/section&gt;


But unfortunately this module doesn't show anything.
Your hook_theme() implementation is returning an array with missing details; the key should be variables and its value array should contain keys that matches the variable names in your template.

function profile_header_theme($existing, $type, $theme, $path) {
  return array(
    'profile_header' =&gt; array(
      'template' =&gt; 'profile_header',
      'path' =&gt; $path . '/theme',
      'variables' =&gt; array(
        'field_store_name' =&gt; NULL,   
      ),
    ),
  );
}