Since arriving in Thailand, I have learned that the these shrines or spirit houses are intended to increase a person’s good karma, which is a Buddhist belief. Karma is essentially the belief that the sum of a person’s actions in their past life will determine their fate in their present life and future. Think of it as good luck or bad luck, except instead of being random good or bad luck, karma is earned through your actions in a previous life. The shrines throughout the city represent the local Thai people's attempt at earning good karma. Respect for spirits and animals are thought to bring about good karma, which is why the locals place their offerings in the shrines.
This tradition is connected to the environment through the placement of the shrines and the Hindu belief that every living thing has a soul. The Thai people are deeply spiritual and will build their home around a tree with special spiritual significance, and then they place the household shrine where it will not disturb the tree or have a shadow on it. The tree itself is then wrapped in ribbons to please the tree spirits. In this way the shrines are connected to the environment.