Think of this in terms of Le Chatelier's Principle.
An unshaken bottle should be in a state approaching thermodynamic equilibrium of concentration, temperature, volume, and partial pressure. The rates of the chemical reaction describing solution of the CO2 components is equal in both the solution and the dissolution directions.
When you shake the bottle, you mix it and speed up the reaction in the direction of solution. (Just like you can speed the dissolution of sugar in tea by stirring.) This causes the liquid to become super-saturated with respect to the CO2 component. Uncork the bottle and pressure of the gas is suddenly lowered and the super-saturated solution boils. Super-saturation is a metastable state.
As a test of this hypothesis, I also think you would find shaking a closed bottle of pop will slightly lower the temperature and slightly lower the pressure of gas and slightly change the volume of liquid.