Shortcodes are extremely convenient and prevalent these days. You will find several wordpress plugins that allow you to insert content into a post or page via shortcodes.
To be clear, shortcodes are meant to be used within the post or page content area. If you are looking to insert a shortcode within the php code, in your theme file or wordpress template, you want to wrap it within a php like so:
<?php echo do_shortcode(“[shortcode]”); ?>
Did this help? Send questions in comment below.