First of all, here’s the code:
<?php echo do_shortcode('[my shortcode here]'); ?>
There. Hopefully that showed up in the Google excerpt. (I hate when the useful stuff is buried deep down on the page.) What you’re looking at is a handy solution to a particular kind of problem. As I’ve written before, shortcodes can be a mixed blessing. On the one hand, they allow you to access some pretty cool features from a wealth of WordPress plugins. On the other hand, you’ll have those shortcodes in your content pretty much forever, even if you later decide to ditch the plugin. They’re harmless, of course, but if you’re like me then you just don’t want the litter.
I use one shortcode in my running site, for a Flickr gallery plugin. Since I tend to put it at the end of my articles, I started fishing around for a way to put the code in from outside the loop. Just a few minutes on Google resulted in the example above. This way, I have the shortcode call in just one place. If I ever change Flickr plugins, it won’t be an act of congress to clean them up.
However, I feel I should mention that there are times when you’ll want to use them as intended. If your design calls for shortcodes withing posts, then of course you should do just that. It’s nice to have an option, though.