Marxism holds that religion and philosophy are ideologies that are far from the material and economic basis of society. Although their relationship with the existence conditions of matter is blurred by some intermediate links, this relationship exists. Religion, like philosophy, is a superstructure explained by social and economic basis.
Religion was born in the most primitive times from people's most primitive ideas about their own nature and the surrounding external nature. With the development of human society, religion has experienced the development process from clan religion to national religion and world religion. No matter what form religion takes, it should be responsible for God, gods, soul and the afterlife. Different answers to these basic questions form theistic materialist philosophy and materialist atheistic worldview respectively. Any religion is the worship of God or other gods, the belief in the immortality of the soul and the pursuit of the afterlife, so any religion contains theistic idealism philosophy or the bud of this philosophy.
Religion is closely related to philosophy, and the origin of religion is naturally related to idealism philosophy. In ancient times, people didn't know the structure of their bodies at all. They were influenced by the scenes in their dreams, so there was an idea that their thoughts and feelings were the activities of the soul, and the soul lived in the human body, and when people died, they left the body. Since then, people have to think about the relationship between this kind of soul and the outside world, which has produced the concept of immortality of the soul. Similarly, due to the personification of natural forces and the abstract natural process in intellectual development, the original god was produced.
With the development of religion, these gods have more and more images beyond the secular world. Due to the integration of clans and tribes and the establishment of a unified dynasty, the concept of monotheistic gods stands out from many gods in people's minds. Therefore, the relationship between thinking and existence, spirit and nature, the highest problem of all philosophy, like religion, is rooted in narrow ignorance. Philosophers are divided into two camps according to their different answers to the relationship between thinking and existence. Those who conclude that spirit is the origin of nature, and therefore admit the theory of creation in some way in the final analysis, form an idealist camp. Anyone who thinks that nature is primitive belongs to all schools of materialism. Any religious theology belongs to the camp of idealism when answering the basic questions of philosophy, and any atheism belongs to all schools of materialism.
Idealism philosophy and religious theology are interlinked in essence. The essence of idealism lies in taking psychological things as the initial starting point, from psychological things to nature, and then from nature to the consciousness of ordinary people. Philosophical idealism is just a hidden and decorative theory of ghosts and gods. All idealists, whether philosophical or religious, believe in God, revelation, savior and miracle worker. Whether this belief takes the form of rough, religious or civilized philosophy depends only on their educational level.
From the development of philosophy, idealism is consistent with religious theology. The original spontaneous materialism of ancient Greek and Roman philosophy could not fully understand the relationship between thinking and existence. The necessity of understanding this problem leads to the theory that the soul can be separated from the body, which leads to the conclusion that the soul is immortal and finally leads to monotheism.