Wear a comfortable pair of shoes. And if you are taking one of the more rugged paths, then something with a good grip at the ankles is recommended.
On the nature hikes do not leave the trail or spur, unless you are very sure of where you are going - distances and directions can be deceptive. The Shimla hills do not have poisonous snakes except the banded krait and these are rarely, if ever, encountered. It is also suggested that for these trails, the services of a guide be engaged.
A crowd of porters may besiege you at the bus and taxi stand. If you don't need their services, keep an answer ready to ward them off. They also work as agents for hotels, so check out the place for you.
The steep climb from the Mall to where most of the hotels are located can be very strenuous, so accepting the services of a porter can be a good idea -- but keep track of them as they walk very swiftly. Carry light woolens for the summer and heavy woolens for winter.
Avoid green salads, uncooked food, and unhygienic water to save you from Traveler’s Diarrhea which is a common problem. Carry sunscreen with minimum SPF 20 to escape sunburn. Travelers from yellow fever areas are required to have an inoculation certificate. Prior inoculation for poliomyelitis is recommended.
Cases of mugging, theft and worse aren’t completely unheard of but by and large serious crimes against travelers are few and far between. If you lose your passport, lodge a First Information Report (FIR) at the local police station and contact your embassy