Two temples in Shanghai. City God Temple of Shanghai has 3 tickets and tours to book; Longhua Temple has 2 tickets and tours to book. The table and the two notes below put them side by side; the full pages have what to see, the ticket and the timing for each.
Entry to the temple itself is paid at a ticket window by the main gate, and the price is modest, so there is little reason to book a ticket in advance. What is sold online are walking tours of the old city that use the temple as one stop among several. The usual format is a guided stroll of two to four hours through the lanes of the former walled town, combining the temple with the classical Yu Garden next door, the bazaar streets around it and often a tea tasting or a snack stop for dumplings.
Some versions add a boat trip on the Huangpu after dark, so the day ends with the lit skyline of Pudong and the Bund, and a few are run on a pay-what-you-like basis by local guides.
Longhua Temple is entered with a modest ticket bought at the gate, and you do not need to reserve it in advance. Payment by mobile app is now the norm, but small cash amounts are usually accepted; if you are visiting independently, bring a passport just in case. Incense is sold at the entrance for those who want to make an offering.
The tours on offer are small-group or private walks led by a local guide who explains Chinese Buddhism as you go: the logic of the halls along the central axis, the roles of the Maitreya Buddha and the four Heavenly Kings, how people pray and what the monks do through the day.