When visiting Chinese temples there are a few important things to keep in mind. China is a place of many different types of religious groups and philosophies that are often mixed together. You'll find Buddhist and Taoist temples all over the country from city-center to top of mountains. As well as religious sites, there are shrines dedicated to Confucius and other notables.
While these sites allow tourists to visit and tour their facilities, visitors need to remember that these locations are also places of worship, many with a working group of monks and nuns who live and practice there.
So it is important to know a little etiquette in order not only not to offend, but to feel comfortable and happy with your visit.
Entering a Temple Compound
Temples that welcome visitors have ticket windows outside the walls of the compound. There is always a guard at the gate so you won't be able to get in if you haven't bought your ticket. The money goes to feeding the monks and nuns (if there are any) as well as to the upkeep of the temple and payment of the staff.
Entering Temple Gates and Buildings
Temple complexes are often set on a north-south axis with the gate and openings facing south. You enter the south gate and make your way north. Buildings and gates usually have a step over which you must walk. Never step on top of the wooden step, rather, place your foot on the other side. You can wander around the complex, going into any of the buildings where the doors are open. Some buildings or small temples may have doors that are closed and you should not try to go into these areas as they are most likely meant for the people who work or practice there.
Inside temples, especially Buddhist ones with large images of Buddha or his disciples, photography with flash is not allowed. Sometimes no photography is allowed. Visitors don't have to worry about making a mistake as most temples that don't allow photography have signs that indicate if photos are allowed.
Some temples allow photos for a fee. If you are unsure, you should respect the temple and always ask the guard or monk who is sitting inside the room. (A simple gesture of holding up your camera and looking inquisitive should get the message across.)
You should be circumspect taking photographs of people praying and practicing their religious beliefs. Watching Tibetans prostrate themselves in front of a temple can be mesmerizing and you'll want to document it, but be discreet. You should always, if and where possible, get permission before you take photos.
If you'd like to make a donation, there is usually a donation box or place where you can give money.
You'll see food, money and candle donations at altars. You should never touch these.
Praying and Worship
You should feel free to join the worshipers at temples. No one will think ill of you and it is not thought of as heretical as long as you are genuine in your actions and are not making fun of the traditions.
Many worshipers buy a bundle of incense. You light the incense from the large candles that are usually burning outside the temple hall (or follow other worshipers). Holding the incense between both hands in prayer, many worshipers face each cardinal direction and utter prayers.
After that, one places the incense in the large holder (looks like a big cauldron) outside the hall.
What to Wear
There's no special way to dress but remember that you're visiting a place of worship. Read more here about What to Wear to a Temple in China.
Enjoy Your Experience
Don't feel self-conscious about visiting a religious site. You should enjoy the experience, ask questions where you can and interact with the people who are visiting.
For an even more in-depth discussion, read my Dos and Don'ts of Temple Visiting in Tibet.