What causes short sharp pain in head? It is accompanied with shoulder pain and neck pain

Pinched nerve? Could be many things, but short bursts of radiating pain including the neck and arm (shoulder) can indicate a pinched nerve. If the problem persists for 2 weeks or more see your doctor.