Shaking a bottle/can of soda, doesn't actually increase the pressure inside the container. If that were the case, you'd run the risk of your can of soda randomly exploding like a grenade.
Bonus: to avoid a can of soda exploding in your face, flick the side of the can/bottle a few times whilst rotating the can. This is to release the bubbles that are stuck along the inner walls. Those bubbles are what actually causes the soda to burst out. Tapping the top is very ineffective in comparison.