If you wanna show the content in sidebar if current post content has the shortcode then you should try has_shortcode
function. Here is a demonstration-
$content = get_the_content();
if( has_shortcode( $content, 'your-shortcode' ) ) {
// The content has a [your-shortcode] short code, so this check returned true.
}
Hope it helps.