trying to add a template file to my module using hook_theme_registry_alter
I'd imagine you should be using hook_theme() instead of hook_registry_alter() to define your theme function:

function MYMODULE_theme() {
  return array(
    'popover' =&gt; array(
      'template' =&gt; 'popover',
      'variables' =&gt; array('var1' =&gt; array(), 'var2' =&gt; '')
    )
  );
}


Then you can call it from anywhere (including a page callback, which I think is where you're trying to return this from given your comment above):

$output = theme('popover', array('var1' =&gt; $var1, 'var2' =&gt; $var2));


In the popover.tpl.php file in your module's root folder you'll have access to the variables $var1 and $var2, which will be the vars you defined/passed into the theme function.

Then you can build up your HTML as you need.