How to use Nextgen gallery using custom php code on theme file

Nextgen is pretty famous gallery plugin used in WordPress. It provides shortcode to insert gallery in posts,pages, sidebars etc. In this post, you are going to see how to we can use nextgen’s built in functions to show these galleries, albums in WordPress template files.