Instead of use another widget I wish to code the technique to incorporate the Wordpress "Groups" widget directly inside the content of the page or publish. Any ideas?

To include wordpress publish groups in to the template file you should utilize

<?php wp_list_categories($args); ?>

Default arguments are :

<?php  $args = array(
      'show_option_all'    => ,
      'orderby'            => 'name',
      'order'              => 'ASC',
      'show_last_update'   => 0,
      'style'              => 'list',
      'show_count'         => 0,
      'hide_empty'         => 1,
      'use_desc_for_title' => 1,
      'child_of'           => 0,
      'feed'               => ,
      'feed_type'          => ,
      'feed_image'         => ,
      'exclude'            => ,
      'exclude_tree'       => ,
      'include'            => ,
      'hierarchical'       => true,
      'title_li'           => __( 'Categories' ),
      'show_option_none'   => __('No categories'),
      'number'             => NULL,
      'echo'               => 1,
      'depth'              => 0,
      'current_category'   => 0,
      'pad_counts'         => 0,
      'taxonomy'           => 'category',
      'walker'             => 'Walker_Category' );
 ?>

or simply employ it without parameters, for the reason that situation defaults works.

 <?php wp_list_categories(); ?>

read much more about this function here