G'day Mr.bestcssdesigns,
The reason your code won't work within the template files is because it's a short code (WordPress fishes through your post text to try and find these, then executes it accordingly). Inserting a short code straight into your PHP files is the same as inserting plain text.
If there isn't an alternative to using the short code, you can use it within a php hook (do_shortcode), depending on what version of WP you're using.
<?php echo do_shortcode('[slideshow id=x w=width h=height]'); ?>
Hope this helps. I just used this on a project I'm working on and it worked fine, so if it doesn't work for you, check that you have the latest versions of NextGen and WP installed.