Display post shortcode content in the sidebar?

A shortcode handler doesn’t have to return anything, it can just modify a global variable that you later read in your sidebar widget. If your sidebar is displayed after your post content (most likely if it’s a right sidebar), you can do this without any problem. If your sidebar is displayed before the post content it is more complicated: you have to start output buffering when your widget is called, wait until the rest of the page is displayed, and then do something with the shortcode content and flush the output buffer.

A simple “proof of concept” that displays the shortcode content not in the post but in the footer:

$wpse13925_shortcode_content = array();

add_shortcode( '13925', 'wpse13925_shortcode' );
function wpse13925_shortcode( $shortcode_attr, $shortcode_content )
{
    $GLOBALS['wpse13925_shortcode_content'][] = $shortcode_content;
    return '';
}

add_action( 'wp_footer', 'wpse13925_footer' );
function wpse13925_footer()
{
    var_dump( $GLOBALS['wpse13925_shortcode_content'] );
}