hard code shortcode only on specific category

If you’re embedding the code directly into the template file, why bother with shortcodes?

Simply extract the code from the add_shortcode() function call, and add it to your template, wrapped in an appropriate conditional tag, such as in_category(), e.g.:

if ( in_category( $cat ) ) {
     // put shortcode code here
}

Note: the $cat argument can be an ID, name, or slug.