shortcode is WordPress-specific codes that will do the things in an easy way. We have several default shortcodes and a shortcode will be inserted in a post or page file by embedding square braces.
Once I got a requirement to add the shortcode in the sidebar. So I just edited the sidebar.php file and added shortcode in the sidebar. As a developer I know how to add the code in the file so i can do it in that way. This notes is for the one who does not know how to embed the code. For this add the following line of code to your theme functions.php file.
Enjoy using the shortcodes