$modules = JModuleHelper::getModules("dashboard_main");
$document = JFactory::getDocument();
$attribs = array();
$attribs['style'] = 'xhtml';
foreach ($modules as $mod) {
echo JModuleHelper::renderModule($mod, $attribs);
}