How can I print a field from a referenced entity in my theme?
You could do this using either of these:


hook_node_view() in your own custom module
hook_preprocess_node() in your theme template.php


Here's an example of both of these methods. The idea is the same as what rooby suggested earlier but you need to modify the content of the node, not the fields.

Example 1: hook_node_view(), can be used in a custom module.

    // Implements hook_preprocess_node();
    function mycustommodule_node_view($node, $view_mode, $langcode) {

      $field_name = 'field_main_image';

      // Check that the field exists in our node and that it has no content.
      // Alternatively we could check $node-&gt;type.
      if (
        isset($node-&gt;$field_name) &amp;&amp;
        empty($node-&gt;$field_name)
      ) {

        // Use entity metadata wrapper to gain easy access to referenced entities.
        // This method is more reliable than digging the field array.
        $node_wrapper = entity_metadata_wrapper('node', $node);
        if ($node_wrapper-&gt;field_master_reference-&gt;raw()) {

          // Get the referenced node object.
          $master = $node_wrapper-&gt;field_master_reference-&gt;value();

          // Use field_view_field to get the renderable content of the field.
          // Save this data in $node-&gt;content so that node template can output it. 
          $node-&gt;content[$field_name] = field_view_field('node', $master, $field_name);
        }
      }
    }


Example 2: hook_preprocess_node(), can be used in theme template.php.

    // Implements hook_preprocess_node();
    function mycustomtheme_preprocess_node(&amp;$vars) {

      $node = $vars['node'];
      $field_name = 'field_main_image';
      if (
        isset($node-&gt;$field_name) &amp;&amp;
        empty($node-&gt;$field_name)
      ) {
        $node_wrapper = entity_metadata_wrapper('node', $node);
        if ($node_wrapper-&gt;field_master_reference-&gt;raw()) {
          $project = $node_wrapper-&gt;field_master_reference-&gt;value();
          $vars['content'][$field_name] = field_view_field('node', $project, $field_name, array(
          'type' =&gt; 'image',
          'settings' =&gt; array(
            'image_style' =&gt; 'thumbnail',
            'image_link' =&gt; 'content',
          ),
        ));
        }
      }
    }