It affects the shareholders in the sense that the shareholder's stake in the company is now worthless. Shareholders are the last in line to get anything from a dissolution -- so if a corporation goes belly-up, any taxes owed will have to get paid before any shareholder gets anything from the dissolution.
Now, if the corporation pays out to its shareholders BEFORE paying out to its creditors (or the IRS) -- although I'm not sure how that would happen -- then the shareholders could potentially be on the hook up to the amount they received from the dissolution, since that money should have gone to the creditors, and not them.
If there are no assets when the company goes bankrupt, then I guess nobody gets anything. But there is no way that the shareholders should get paid before the creditors.