I have an iPhone 5 running 7.0.4... My shake to shuffle and undo both work fine. I know shake to shuffle can be turned on and off under setting/music. As for Shake to undo I don't think it can be turned off... I could be wrong on that but I'm pretty sure. Hope this helps...
I noticed (with my previous iPhones) that you have to shake it like a bit of a madman to get it to register. Like flailing out of control. Make sure you're not in public.