How to attach sidebar to shortcode’s output?

I’m still not sure exactly what you’re trying to do, but here’s one possibility if it’s to display something like this:

PAGE CONTENT | SHORTCODE/POSTS LOOP | SIDEBAR

Do you have control of the shortcode content? If so, you could update it so its output is wrapped in a <div id="shortcodecontent"> --shortcode post-loop output-- </div>.

Then add a text widget to your sidebar and insert the [shortcode] within it. If shortcodes aren’t rendering when inserted in widgets, add the following line to the functions.php file within your theme:

add_filter('widget_text', 'do_shortcode');

Now, the shortcode output will appear first, before any of the other widgets in your sidebar. Using CSS, style the wrapping #shortcodecontent div so that your shortcode widget floats to the left of the other widgets in your sidebar.

Hope this helps in some way! Best of luck.