Our recent client need some plugin that display the code using shortcode, like we all know, mostly shortcode must be injected or put on post content.
Sometime we have another problem, we need to use the shortcode but not in Post Content, we need to put it directly in our theme. How To Use this WordPress shortcode? From WordPress Codex.
I got the right solutions. We only need very simple code and the shortcode will be automatically executed, I will give example below.
On this code above, the theme will be executed gallery shortcode. Now you can directly injected shortcode on your theme, whenever you want and you like it.
Pictures Taken from Egotastic