The water supply pipes that go to your shower normally should not shake or make noises as if they are shaking and hitting other surfaces in the wall. If your water pipes are making noises when you take a shower, look into the potential causes of the problem to find a solution.
The water supply pipes leading to your shower may not be properly secured, allowing the pipes to knock against each other or other surfaces behind the wall. To confirm and correct the problem, cut into the wall directly behind the shower's faucet, which you may patch once you are done. Attaching a metal strap to a wall stud or other steady surface as well as the pipes will solve the problem.
The shaking sound may be from the shower's faucet water valves wearing out. The valves contain rubber, which over time becomes brittle and affects the flow of the water. Shaking in the pipes occurs as the water no longer flows through them smoothly but churns instead. Removing the shower's faucet handles and replacing the valve assemblies with new ones will allow the water to flow smoothly again.
If your house's water pressure is too high, the result will be loud noises or movement of the pipes caused by the extra pressure. To confirm that your water pressure is high, contact a plumber. If you find that high water pressure is the cause of the pipes shaking, the plumber can talk to you about possible solutions, depending on the configuration of your house's plumbing.
Water hammer occurs when the water in the pipes does not flow smoothly because of the presence of air in the pipes, causing them to move or make knocking noises. You may temporarily relieve water hammer by using the shower faucet's access panel on the wall directly behind the faucet to access the water valves. If you partly close the valves and constrict the amount of water flowing through the pipes, the water hammer may subside. A plumber can relieve water hammer by installing either a larger water supply pipe or a water hammer arrester.