Creating a shortcode using a controller

I use this method and it works well for multiple shotcodes: