I'm trying to make the perfect Egg Cream, which requires maximum carbonation. Should I shake the bottle before opening it?
No. Shaking will create a lot of small bubbles which will act as nucleation points to release the dissolved gas when the container is opened and the pressure released.
What will help is chilling the soda water as much as possible. Gas is more soluble in water at lower temperatures, and the difference is appreciable over a relevant range (drinks fridge at 8C vs the coldest part of your fridge at 2C). Be sure to leave it long enough that it's well and truly cold, and handle gently.
It makes things worse. When you shake the liquid, it allows the gas to escape more easily, making the liquid less carbonated when you actually use it.