Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Taken from http://drupal.org/node/42599
Thought it really needed to be here as well.
// load a second copy of the view -- unfortunate but we don't have access
// to the existing one.
$view = views_get_view('VIEWNAME');
// the array() indicates no arguments, which will provide the summary view.
// We also don't want the pager for this view.
print views_build_view('embed', $view, array(), false, false);