// extra code to make this work
$style = -2; // set the style
$position = "menu_principal"; // set the position of the modules to be loaded
// end of extra code
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('module');
$params = array('style'=>$style);
$contents = '';
foreach (JModuleHelper::getModules($position) as $mod) {
$contents .= $renderer->render($mod, $params);
}
// this part allows html characters to show correctly
echo html_entity_decode($contents);
?>