The sociology of religion studies religion as a social fact, how it shapes and is shaped by community, authority, class, and social change, and how religious groups form, endure, transform, and dissolve. It is one of the founding subjects of sociology itself, addressed by all three of the discipline's classic figures. Emile Durkheim, in The Elementary Forms of Religious Life, argued that religion is fundamentally social: the sacred-profane distinction is its defining category, and the real object of worship, behind the totem or the god, is society itself, whose collective effervescence in ritual generates the sense of a power greater than the individual. Max Weber analyzed religion as a force in history and social action, most famously in The Protestant Ethic and the Spirit of Capitalism, which argued that the ascetic discipline of Calvinism helped shape modern capitalism, and gave the field enduring concepts: charisma and its "routinization," the process of rationalization, and the typology of prophet, priest, and sect. Karl Marx offered the influential critique of religion as the "opium of the people," an ideological expression of and consolation for material suffering.
Later sociology developed the church-sect typology (and the study of denominations and new religious movements), theories of secularization and its limits, and the analysis of civil religion, religious markets, and fundamentalism. The field is distinguished by its focus on the collective and institutional life of religion, not what believers believe in the abstract, but how religion works as a structure within, and a shaper of, human society.