How to visit a temple
Behave calmly and respectfully. Show your respect by making a short prayer in front of the sacred object. Do so by throwing a coin into the offering box, followed by a short prayer.
At some temples, visitors burn incense (osenko) in large incense burners. Purchase a bundle, light them, let them burn for a few seconds and then extinguish the flame by waving your hand rather than by blowing it out. Finally, put the incense into the incense burner and fan some smoke towards yourself as the smoke is believed to have healing power. For example, fan some smoke towards your shoulder if you have an injured shoulder.
When entering temple buildings, you may be required to take off your shoes. Leave your shoes on the shelves at the entrance or take them with you in plastic bags provided at some temples. Wear nice socks. Remove hats.
Photography is usually permitted on the temple grounds, but is often forbidden inside the buildings. Watch for signs.
How to visit a shrine
Behave calmly and respectfully. Traditionally, you are not supposed to visit a shrine if you are sick, have an open wound or are mourning because these are considered causes of impurity.
At the purification fountain near the shrine's entrance, take one of the ladles provided, fill it with fresh water and rinse both hands. Then transfer some water into your cupped hand, rinse your mouth and spit the water beside the fountain. You are not supposed to transfer the water directly from the ladle into your mouth or swallow the water. Do not return any water from the ladle into the fountain, but dispose of it next of the mountain. You will notice that quite a few visitors skip the mouth rinsing part or the purification ritual altogether.
At the offering hall, throw a coin into the offering box, bow deeply twice, clap your hands twice, bow deeply once more and pray for a few seconds. If there is some type of bell or gong, use it before praying in order to get the kami's attention.
Photography is usually permitted at shrines, except inside the buildings. Watch for signs.