Disclaimer--I am an Agnostic

Again, how little you know...

In Catholicism (since that is what this phrase originally references) one does not store up riches in heaven by doing only good works. One can only go to heaven because of the innate goodness of the person. Original sin aside (they've really been toning it down lately), if a person is good--that is, they are kind, compassionate, helpful, and do good works not out of a hope for rewards but out of said compassion and desire to alleviate the pain of the universe--then one will go to heaven, regardless of any belief or disbelief in Jesus as savior and God.

$ given to the church doesn't = heaven; the Middle Ages are over, boyo.