This shortcode publishes comma-separated names of the groups to which the current user belongs. To publish group names for another user, use the uid parameter.
[profilegrid_user_all_groups uid="1" sep=","] uid is a user ID and it's optional. sep is separator and it's optional. The shortcode is available with the core plugin.