By way of preface, we may note that it is all right to acquire wealth and accumulate any amount of assets, as long as it is not done by fraud or evil devices. It is all right to eat and drink with elegance, as long as we do not invest our lives in such things. It is all right to be housed as graciously as befits one’s station, to chat with others like ourselves, to go to games, to consult about worldly affairs. There is no need to walk around looking pious with a sad, tearful face and a bowed head. We can be happy and cheerful. There is no need to give to the poor except as the spirit moves us. In short, we can live to all appearances just like worldly people. This is no obstacle to our acceptance into heaven as long as we keep God appropriately in mind and act honestly and fairly toward our neighbors. Our quality is actually that of our affection and thought, or our love and faith. Everything we do outwardly derives its life from these, since acting is intending and speaking is thinking. We act, that is, from our intent, and we speak from our thought. So when it says in the Word that we are judged according to our deeds and rewarded according to our works, it means that we are judged and rewarded according to the thought and affection that give rise to our deeds or that are within our deeds. This is because deeds have no meaning apart from these contents. Their quality is wholly determined by them.
We can see from this that our outer nature accomplishes nothing. It is our inner nature, which gives rise to the outer.
Take for example people who behave honestly and do not cheat others solely out of fear of the law and loss of reputation, leading to loss of respect or profit. If that fear did not restrain them, they would cheat others as often as they could. Their thought and intent are fraudulent, even though their actions look honest in outward form. Because they are dishonest and fraudulent inwardly, they have hell within themselves. But if people behave honestly and do not cheat others because this is against God and against their neighbor, then even if they could cheat someone they would not want to. Their thought and intent are their conscience, and they have heaven within themselves. In outward form, the actions of the two kinds look alike, but inwardly they are totally different.
from Heaven and Hell, Section 358