The Shrines are a recurring activity in the Persona series.
Persona 4 GoldenEdit
Usually, the protagonist is only able to visit the Shrine during the day. However, the location can become accessible during the evening if their Courage stat is at least Rank 2 (Reliable).
While praying, the protagonist needs to choose how much they want to pay in offerings: they can either pay none, pay ¥5, or ¥1,000, then choose which Confidant's rank they wish to boost. Up to 3 points will be added, depending on the three choices, and whether the protagonist has brought a Persona with the same Arcana as the Confidant.
The Meiji Shrine is also a hangout spot, which the protagonist can visit with one of their Confidants. For more information, see Meiji Shrine.