The couple wore yellow scarves and garlands at the 200-year-old Hindu temple in Bahrain's capital Manama.
Prince Charles earlier held talks with the country's long-time Prime Minister, Sheikh Khalifa bin Salman al-Khalifa.
The royal couple have also visited the United Arab Emirates and Oman during the seven-day trip.
The Bahrain visit marks 200 years of formal relations between the two countries, dating from a treaty of friendship signed in 1816.
The UK maintains strong military ties to Bahrain, where it has run its permanent naval base HMS Juffair for more than a year.
Prince Charles paid the base a visit to open a welfare block and inspect HMS Middleton.
But the trip comes amid concerns of continued human rights abuses in Bahrain.
Prince Charles has faced calls to raise concerns over how Bahrain's security forces have dealt with a string of mass protests in the country.
He began the day visiting Sheikh Khalifa, who has been in office since 1971, on the Bahraini ruler's custom-built private island.
The Middle East tour, which was organised by the UK government, aims to boost partnerships in the region in a range of areas, including wildlife conservation and women in leadership.
During the day, Camilla visited St Christopher's School, a British-style school with 2,200 pupils, speaking to the students about their literacy and music lessons.
She later met a group of young businesswomen known as the Supreme Council for Women, which is chaired by Princess Sabeeka bint Ibrahim Al Khalifa, the first wife of Bahrain's King Hamad.
The council, which was set up in 2001 to advise the government on women's issues, consists of a group of 16 women from a "wide range of backgrounds and experiences".
The royal couple later unveiled two new stamps, to commemorate two centuries of diplomatic ties between the UK and Bahrain, at the Post Office Museum.
Prince Charles also visited the Al-Fateh Grand Mosque, the largest in the country, where he signed the visitors' book and was given a tour.

The girl suffered injuries to her head, arm and leg in the incident in July 2014, Plymouth Crown Court heard.
Christopher Budd, 20, of Trelawney Gardens, Liskeard, Cornwall, and Ryan Swaddling, 23, from Cleeve Drive, Ivybridge, Devon, both deny dangerous driving.
About 200 people attended the event.
The girl, who cannot be named for legal reasons, said: "I thought I was going to die. You could hear screaming. I felt my head and I had a massive bump on it."
She added: "You could hear bodies bang against the car."
Another teenager told the court a car drove over her leg at the meet.
The 17 injured, aged between 12 and 20, were among a crowd watching cars at the B&Q car park in Tavistock Road on 26 July.
One witness told the court: "I fell to the floor and the car went over my leg. I don't remember how I hit my head. I remember everyone looking at me and blood pouring from my head."
Another witness said the vehicles were seeing how fast they could get to a speed bump and trying to create smoke from their tyres.
He added there was one girl on the floor and there was "blood everywhere" after the crash.
The trial continues.

Events were held around Wales on Thursday to mark the monarch's milestone birthday, including a 21-gun salute and fireworks at Cardiff Castle.
The Queen was in Windsor to light the first of more than 900 beacons in the UK and around the world.
Army Cadets lit the Snowdon one while others were lit in Swansea, Wrexham, Llantrisant and Cardiff Bay.
The 21-gun salute was sounded at 12:00 BST and there was a drinks reception for other people celebrating milestone birthdays and anniversaries.
"This is a wonderful opportunity for people to come together and commemorate their special milestones with that of Her Majesty," said Cardiff Lord Mayor, David Walker.
Meanwhile, 40 giant fibreglass models of the Queen's head are being displayed at a farm in Flintshire.
David Pickering won lottery funding to create them for the Diamond Jubilee in 2012.
He has decided to display them again on his land near Higher Kinnerton as the nation pays tribute to Britain's longest-serving monarch.
The Prince of Wales has met Bahrain's prime minister before visiting a temple with the Duchess of Cornwall on their final day of touring the Middle East.
[NEXT_CONCEPT]
A teenager said she thought she was "going to die" after being hit by a car that collided with a crowd of people at a "cruising" event in Plymouth.
[NEXT_CONCEPT]
A beacon has been lit at the top of Snowdon as part of festivities to celebrate the Queen's 90th birthday.