If you want to know how to pull HTML from a template rather than writing the HTML in the plugin take a look at what I've wrote.
PHP Code:
function prepare_output($id = '', $options = array())
{
global $vbulletin, $db;
$query = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "mkwtracktimes WHERE userid = '".$vbulletin->userinfo['userid']."'");
while($mkw = $db->fetch_array($query))
{
eval('$data .= "' . fetch_template('mkw_profilebit') . '";');
}
$this->block_data['mkwttrecords'] = $data;
}