There are two new shortcodes for NextGen Gallery:
[recent max=4]
and [random max=4]
Set the ‘max=’ value to number of pics you want returned and displayed. You can also include the optional ‘mode=’ parameter to grab pics by most recent date (i.e. [recent max=4 mode=recentdate] ). Finally, if you want to use this shortcode outside of content in a loop for posts, you can add the following PHP directly into a template file (i.e. to place in sidebar on a Page or something):
<?php echo do_shortcode('[recent max=4 mode="recentdate"]'); ?>
Hope that helps!