Posting code inside the post instead of in the template file using shortcode

Try replacing your shortcode function with following code:

function rating_function() {
    if (function_exists('thumbs_rating_getlink')) {
        $content = thumbs_rating_getlink();
    }
    return $content;
}
add_shortcode('rating', 'rating_function');

tech