Chinese philosophical idea on religion
Shendao teaching () is a Chinese philosophical perspective on religion. Originally it referred to conduct conforming and in harmony with the principles of Nature, following the subtlety of the path of Heaven's Way; it lays the basis for the teachings of tianxia, a worldview promoting social order and harmony, in which the commoners were unified and compliant, to the benefit of the whole society. It is also translated as "to educate by means of mysticism", the "education" here referring to moral education. 
The Chinese idea of "Shendao" arose in the early Western Zhou and later became a strategy and method of character education in the Confucianism ideological system, for strengthening integrity or virtue (, ) and other socially desirable traits. As it developed, concepts of gods, ghosts and demons were used as a means of character, or moral, education; such training included theories about the effect of fate or fortune, heaven or hell.
Shendao is considered instrumental in the later adoption of the Western concept of religion in China.
Shang dynasty.
In the Shang dynasty system of polytheism, the supreme god, the "Shangdi", is only a natural manifestation of the "Tiandao" ( 'way of heaven'). The "emperor" in the divination is similar to what Xunzi said during the Warring States period, "Heaven has its own course, not for Yao to exist, not for Jie to perish" (Xunzi - Treatise on Heaven), as a natural law without direct influence on earthly affairs. Shang sacrifices were never only to ancestral gods and nature gods, often asking for "emperor" but never offering sacrifices to "emperor". The Shang belief in ghosts and gods is not essentially different from prehistoric beliefs, and there is no element of artificial political control and deception in later times.
Zhou dynasty.
In contrast to the primitive polytheism of the Yin (Shang), the Zhou strengthened the divinity of the Shangdi and weakened the many ancestral and nature gods. The King Wu of Zhou established a special "imperial registry" to worship God. The god of the land was built with chestnut wood to "make the people tremble". The Zhou also created the "imperial court" as the "office" of the Emperor. King Li of Zhou believed that the emperor could send down "a great Lu order to protect my house, my position, and the body of Hu". (Hu Gui, Zhonggui 4317). There are also Yi inscriptions that say, "The emperor is weary of the death of the wrecked emperor, and the pro-insurance of my (there is) Zhou, the summer of the people of the four directions, the death of not Kang Jing (Shi Xiang Gui, Zhonggui 4342), meaning that the glorious emperor was always looking down on and blessing our Zhou dynasty and the common people in the four directions, so that everything under the sky was safe and stable. The emperor of the Zhou dynasty not only "sends down virtue", but also monitors the words and deeds of his subjects. 
The world of the gods, mainly "emperor" and "heaven", became a strong backing for the kingship of the Zhou Dynasty, and established the concept of rule with "Mandate of Heaven" as the core, while the king of the Zhou was analogous to "heaven" as a father-son relationship, thus the term "Son of Heaven" began to appear. This practice of the Zhou was Shendao's establishment of religion, which became a tool for political rule and adapted to the needs of patriarchal kingship. Confucianism, on the other hand, asserts that "a gentleman has three fears: fear of heaven, fear of adults, and fear of the words of the saints. When the words of saint are taken as the precepts of "God", Shendao becomes a special religion that is godless and man-made."
Belief, worship and ritual.
Shendao is a religion based on the way of ghosts and gods, which is from the Tuan Chuan of the Zhou Yi (IChing). The common term for witchcraft and divination is "Shendao", which is different from the original meaning of the Zhou Yi. The ancient Chinese ruler's policy towards religious beliefs was to strengthen his rule by the divine right of "Heaven and Man", also known as Shendao. The use of Jesa (sacrifice), divination, and other mystical practices to convince people was slightly different from the original meaning of the Zhou Yi. However, there are some thinkers who do not believe in ghosts and gods: Fan Zhen completely denied the existence of ghosts and gods but affirmed the role of Shendao teaching. It is said that Shendao "can govern the country, compel the people, and change the customs", and is thus able to eliminate the less desirable behaviours in a society, and encourage beneficial ones.
References.
 ;templatestyles src="Reflist/styles.css" / ;