The full plot of Temple of Doom runs from a Shanghai nightclub to a rope bridge over a gorge, and it ends with Indy returning the stolen stone to Mayapore. Spoilers follow.
After the raft ride, the villagers explain that their sacred stone has been stolen and their children taken. Indy agrees to help, partly out of interest in the fabled Sankara stones. The group travels to Pankot Palace, where the young Maharaja welcomes them with a lavish banquet. That night an assassin attacks Indy, and he then discovers secret passages under the palace.
Below the palace, Indy finds a hidden temple. A Thuggee cult led by the priest Mola Ram makes human sacrifices there and holds the village children as slave labor in a mine. The cult has also brainwashed the young Maharaja. Indy is captured and forced to drink a potion that puts him in a trance, and Willie is prepared for sacrifice.
Short Round escapes slavery and snaps Indy out of the trance, and Indy rescues Willie. They free the children, take back the stones, and flee through the mine in a runaway cart chase and a flood. On a rope bridge over a gorge, Indy cuts the ropes, and many cultists fall to the crocodiles below. Mola Ram clings on, and in a final fight the stones burn his hands and he falls to his death.
Indy takes back the last stone, and British Indian troops arrive and overcome the remaining cultists. The heroes return the stone and the children to Mayapore.