Around 40 to 50 hours is the usual target, ideally spread across a few different specialties rather than concentrated in just one. Try to include at least some primary care shadowing, since many schools' missions place real value on it.
Shadowing exists primarily to prove you actually know what a physician does day to day, beyond the version you've seen on television or in family stories. Past roughly 100 hours, the marginal returns on additional shadowing drop off fast, since it's pure observation. Your remaining time is almost always better spent accumulating hands-on clinical work instead.