It is important to remove you shoes before entering a temple. Upon entering you should be directed as to where to deposit the shoes and informed of any other requirements for your attire.  In Bali, you will also be required to wear a sarong. Upon entering, you will be given the sarong. Someone will help you put it on as well.  You might also see a foot wash area and a sink. You are not required to use these, but might want to if you need to clean up. Upon entering, turn to your left and find the first statue of a god. Pay your respects by either assuming the Namaste pose or going prostrate. Continue until you have gone around the temple and greeted each god in this fashion.  For Namaste, put your hands together in front of you in a praying motion. Bend your head down slightly. Alternatively, you can go all the way down to your knees and bow your head to the ground. The gods will likely have their own alcoves, little spaces cut out in the wall that act like their “homes.” If there is a gathering of people, they priests might be performing a ritual. After greeting each of the gods, you can join the group. Before joining, however, you should check to see if the group is divided between men and women. If so, join the group appropriate for your gender.  Some temples divide services up by gender, but others do not. Pay attention to what others involved in the ritual are doing and repeat their actions. Also, observe how people greet each other. Often, instead of saying “hello,” they will say “Hari om” or “Sai Ram.” One common ritual involves priests walking in front of the crowd with lamps. For this ritual, you will want to hold your hand out over the lamp as it passes and then bring your hand back to your eyes. Do this three times and on the third time brush your hand over the top of your head. This ritual represents bringing the spirit of the fire inside of yourself. The priests might walk around with bowl of liquid or fruit. Hold your hands out in a cupped position, with your right hand over your left hand. When the priest provides you with the liquid or fruit, consume it immediately.  After drinking the liquid, rub anything remaining on the top of your head. Watch what others are doing to make sure that you are following proper decorum. Rituals can vary somewhat from place to play. These offerings are considered a blessing from god. They are formally known as either prasadam or prasad. The priest might walk around marking heads with kumkum, ash, or turmeric. This is a blessing of your third eye. Simply allow the priest to touch your forehead, possibly bending forward slightly to offer your forehead. Be sedate and respectful and avoid loud conversation and laughter. Don't make comments criticizing the religion or culture. Always bear in mind that the temple is a sacred space for those that are there to worship. Extinguish cigarettes before entering and don't bring any food or drink inside the temple. Don't chew gum loudly and always dispose of trash in a trashcan. Turn cell phones and pagers to silent or turn them off completely.

Summary:
Remove your shoes. Greet each god in counterclockwise order. Join rituals. Touch the lamp. Consume the sweets or fruits. Allow your forehead to be marked. Behave.