Shittim was a place where the people of Israel had previously rebelled against God by prostituting themselves to Moabite women and by bringing sacrifices to their god, Baal (Numbers 25:1–3; Psalm 106:28–29). It appears as if Joshua and the rest of the Israelites were encamped in this region while they waited to cross the Jordan River (Numbers 33:49).
1 And Joshua the son of Nun sent two men secretly from Shittim as spies, saying, “Go, view the land, especially Jericho.” And they went and came into the house of a prostitute whose name was Rahab and lodged there.