Enable shortcode support and execute PHP in WordPress's Text Widget.
By default, the Text widget only support text and HTML. With this plugin activated, PHP and shortcode would be supported.
To execute PHP in text Widget, ensure the PHP code to be executed is encapsulated in between PHP opening and closing tag
<?php ... ?>
More information and documentation at http://w3guy.com/shortcode-php-support-wordpress-text-widget/ for the more information.