In Introduction to A Contribution to the Critique of Hegel's Philosophy of Right, Marx criticizes Hegel’s philosophy (German philosophy) with Feuerbach’s ideas of humans as a material, sensuous, and tactile being. Marx starts with a critique on the German status quo: he believes that Germany is backward in that it is still on the eve of a bourgeoisie revolution, while other modern states, such as France and Britain, are already dealing with the class struggle between the bourgeoisie and the proletariat. And hence, instead of the political present, which Marx describes as an “anachronism”, Marx believes that we should critique German philosophy, for it is al pari with the “official modern present ''.
Marx concerns himself with one important question: can this status quo be changed? If so, how can we change it? His answer in Introduction is that while “material force must be overthrown by material force, theory also becomes a material force as soon as it has gripped the masses.” Hence, as long as philosophy is radical enough, as long as it demonstrates ad hominem, it can become the material force needed for a revolution which brings Germany to the apex of history. Marx affirms the importance of philosophy, he praises Hegel for his “resolute positive abolition of religion”, but criticizes his philosophy for abstraction from and losing grip with the material reality. And hence, German philosophy, as it was, could not bring about a radical change in reality, for the material condition for such a change is simply lacking. For Marx, the material reality should be the base for thought, and not the other way around: “it is not enough for thought to strive for realization, reality must itself strive toward thought.”
On this basis, Marx’s stance on religion can be made better sense of. The famous Marxian quote on religion can be found in the very beginning of Introduction: “[Religion] is the opium of the people.” This is a quote that is popularized by perhaps the self-proclaimed Marxist-Leninist political regimes that implement draconian anti-religion measures, and the unfortunate result is that Marx’s stance on religion is seldom understood in a more nuanced way. In fact, preceding that quote, Marx gives a definition on religion that can be read as borderline positive: religion is “the general theory of this world, its encyclopedic compendium, its logic in popular form, its spiritual point d’honneur, its enthusiasm, its moral sanction, its solemn complement, and its universal basis of consolation and justification. It is the fantastic realization of the human essence since the human essence has not acquired any true reality.” Immediately following, Marx remarks on the affective dimension of religion: “religious suffering is, at one and the same time, the expression of real suffering and a protest against real suffering. Religion is the sigh of the oppressed creature, the heart of a heartless world, and the soul of soulless conditions.”
To me, Marx’s criticism of religion is based on his adamant quest for a way to change the status quo. In saying that religion is the opium of the people, Marx is not belittling questions that are asked in a religious manner: questions related to human existence and human suffering. These to Marx are legitimate, right questions to ask. What religious thoughts express are “real suffering and a protest against real suffering”, and it gives humans a way of expression (the sigh), a spiritual safe haven (heart of a heartless world), and an explanation of their suffering (soul of soulless conditions). Religion is what men come up with as a solution to their earthly suffering, which, in fact, stems from material conditions.
Hence, while these are the right questions, to Marx, what is ultimately lacking in religion is a grasp of the real concrete, material human condition. In the quest for a world without suffering, humans have created something that masks the “self-estrangement in its unholy forms”, that is, the material conditions that create these sufferings, the “chains” that bind people to their earthly conditions. Religion provides illusory happiness in putting a screen before human eyes and leads them to be blind to the urgent actions at hand: to rid of the material conditions that require humans to console themselves with fantasies and illusions. Marx believes that a philosophy that is grounded in material conditions should replace religion as the theory of the world that can become a material force, for religion will not lead to the emancipation of humankind, but the former will.