The deity Siva says one should associate only with the good, and this will lead to happiness. The Buddha adds that associating with the good leads to the end of suffering. Siva is the Pali spelling of Sanskrit Śiva, and this marks a rare appearance of a god of this name in the early texts.So I have heard. At one time the Buddha was staying near Sāvatthī in Jeta’s Grove, Anāthapiṇḍika’s monastery. Then, late at night, the glorious god Shiva, lighting up the entire Jeta’s Grove, went up to the Buddha, bowed, stood to one side, and recited these verses in the Buddha’s presence: “Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, things get better, not worse. Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, wisdom is gained—but not from anyone else. Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, you don’t sorrow even among those who sorrow. Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, you shine among your relatives. Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, sentient beings go to a good place. Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, sentient beings live happily.” Then the Buddha replied to Shiva in verse: “Associate only with the virtuous! Try to get close to the virtuous! Understanding the true teaching of the good, you’re released from all suffering.”