As a devotee visiting the temple one should take a bath and wear freshly washed clothes. Women do not visit temples during their menstrual periods.
In India temples and all religious places are considered sacred. In some temples there is no entry for Non-Hindus.
Keep in mind that you will be entering someone else's worship space. Dress and behave respectfully, dont wear short skirts and sleeveless dresses and its good to keep a stole or scarf handy as people prefer to keep their heads covered while in temples or mosques or gurudwaras.
No smoking, talking loud or public displays are entertained. Keep your mobile phones to silent as is written in many places. Dont chew gum instead wash your legs and hands before entering in the sanctum.
It is mandatory to remove your shoes before entering a holy place and in some places leather belts, wallets etc are not allowed. In that case you have to deposit it at the locker.
Taking photos inside temples are mostly prohibited.
In some temples there are separate queues for ladies and men.
In the end of any rituals being performed, you will be offered prasad you can accept it with both hands cupped and accept it with the right one over the left or else politely decline.
Keep the temple premises clean
Devotees can make donations to the temple, by dropping money in a box placed for this purpose.
Beware of people who ask for huge donations for seva, food, temple renovation, stone laying etc. The donations made by you is your wish and should not be forced.
Avoid temple visits during festivals or fairs as it will be too crowded.