I would say enough to make the impression that you really didnt do it just to put it on an application. I think alot of people do this to pad their application and dont really put in alot of time. I would say do what you feel your interests drives you to do. I personally shadowed one Doc 2-4 hours a week for 6 months. I also shadowed several other Docs throughout college in Cardiac Cath labs and surgery. These situations were just for my personal interest and I never put them on applications. Just do what you feel like doing, but if you want to make it appear noteworthy then put in extra effort and show interest.
1. How well do you get along with the doc?
2. What area of medicine is it in?
For example, one doc I shadowed was in EM and we got along so well that I did it for 3-4 months at about 1-2 times per week for about 5-7 hours each time. There were always tons of things going on, so when he was busy with paperwork, I would find something else to do (like talk to patients, etc). If you're shadowing a family doc, you may not have as much stuff to see. Start shadowing and get a feel for how long you think it would take you to really understand what's going on. If you really love it, and the doc doesn't mind, keep going!
If you haven't even started shadowing yet it's too early to decide how long you will shadow for (if you're asking the total length as opposed to hours/wk)!! I'd say tell the doctors you will be shadowing for 6 months or so, and that you'll continue if your schedule will permit. That way you give yourself (as well as the doctor) some leeway in case you guys aren't a good fit or you want to try something else out. As for the question of how many hrs/wk--I'll reiterate that this highly depends on the specialty and it's something you obviously need to negotiate with the doctor. I personally shadowed one doctor for ~4 months for 3-4 hours per week but I felt I could've done more.