V.W.
How hard is she shaking her head? Is it more rhythmic?
My brother use to "rock" his head back and forth. He continued to do so through his toddler years. My mom asked the doctor and they never found anything that caused it... just a habit he had that apparently was self-soothing. The doctor said he would outgrow it.
I remember as a teenager, he would lie on his bed at night and do the same thing while relaxing before sleep. And when he was tired or resting, he would sit in a big comfy chair, listening to music with his eyes closed, and "rock" back and forth.. mostly just his head, but his shoulders a bit too.
Well, he is 43 now, and STILL does this. My kids even mimic him sometimes in fun. It's just a quirky thing he does to relax. Nothing more, nothing less.
Check with your doc to be sure there isn't something more going on... but I'm betting it is a self-soothing mechanism she has found.