I do not think an ideology gets converted into religion. In an article titled, “The Psychology of Ideology and Religion” by Robert J. Burrowes, he defines ideology “as the term widely used to describe the underlying set of values, myths, ideas, attitudes, beliefs and doctrine that shape the behavioural approach to political, economic, social, cultural and/or ecological activities of an individual or organization.” Religion also shares the same underlying values, etc. as mentioned in the ideology description above.
But, in addition, religion also involves the belief in a God or gods. Religion’s rules, no matter the religion, have existed for ages and ages, and were created and recorded by the various religions’ messengers. Perhaps the rules were initially formed by ideologies but I cannot think of any modern examples where an ideology has influenced religion.