An ideology is a worldview: a conception of the nature of the universe intended to help structure human behavior. A religion is an ideology in which one's relationship to the universe is personal and relational rather than material and mechanical.
A religion is an organic ideology, as opposed to mechanistic ideology.