Shang kings believed that they received power, wisdom from their gods, spirits and ancestors. They would also give offerings to gods so they would not punish them by making armies lose in battle or giving farmers a bad harvest. Spirits were believed to live in mountains, rivers, and seas. They would Give offerings to them to keep them happy so they wouldn't get punished the spirits either.