Code is always an issue, since a public water supply is shared.
If your neighbor has improperly plumbed his home, and the water main is ever shut off, which happens quite often really, then the polluted water is sucked back into the main for everyone to share.
In this case, just capping off the shower head, would not be an issue.
If the valve crosses over the hot to cold, you are still working with potable water.
The main reason for shower heads not completely shutting off, would be for condo's and apartments. A cross over connection like that can mix the hot and cold for an entire building, making everyones water luke warm.
If you have a two handle shower valve, it's about as much to repair it, as it is to put a shutoff on the shower arm.
Can you attach a digital photo of the shower valve?