By default, WordPress won’t allow you to add shortcode in sidebar widget. There are several plugins that requires shortcode to be added to post, or do the hard-coding jobs to do them manually on template. And its frustrating when you have a dynamic sidebar and you want a widget that runs on shortcode.
So, a line of code added to functions.php of your theme can make a difference and you can just add shortcode like in posts.
to functions.php file of the theme and after then its all possible.