7 As a matter of fact, religion contributes more to good, just, and orderly life than it could if it had been conceived for no other purpose than to supply and augment the necessities of mortal existence. For religion bids men live in charity, justice, and obedience to law; it condemns and outlaws vice; it incites citizens to the pursuit of virtue and thereby rules and moderates their public and private conduct. Religion teaches mankind that a better distribution of wealth should be had, not by violence or revolution, but by reasonable regulations, so that the proletarian classes which do not yet enjoy life's necessities or advantages may be raised to a more fitting status without social strife.
Source: Meminisse Iuvat (Vatican.va)