I'm not real clear on what you're trying to do. There should be no need to activate NextGen in template files UNLESS you want the gallery to show up outside the loop.
To put a gallery in a post or page, you just use the shortcode as outlined here:
Once NextGen is installed and activated as a plugin, you can drag a widget to any active sidebar.
I tend to use the NextGen Smooth plugin and here's how I implemented in a modified TwentyTen theme. The following goes in the header.php and replaces TwentyTen's header image -- on the home page only -- with a Smooth Gallery of the same size. This code should work fine with NextGen by itself.
And now that I look at, I wonder why the shortcode works within PHP and outside the loop. Hmmm.
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_front_page() ) :
$homeslides = "[smooth=id: 1; width:940; height:198; timed:true; arrows:false; carousel:false; links:false; info:false; align:center; frames:true; delay:9000; transition:fade;]";
elseif ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else : ?>
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
<?php endif; ?>