(A) that the goodness of the will depends on the object alone. But as regards the means, the object of the will is one thing, and the end intended is another. Therefore in such matters the goodness of the will does not depend on the intention of the end.
Objection 2: Further, to wish to keep God's commandment, belongs to a good will. But this can be referred to an evil end, for instance, to vainglory or covetousness, by willing to obey God for the sake of temporal gain. Therefore the goodness of the will does not depend on the intention of the end.
Objection 3: Further, just as good and evil diversify the will, so do they diversify the end. But malice of the will does not depend on the malice of the end intended; since a man who wills to steal in order to give alms, has an evil will, although he intends a good end. Therefore neither does the goodness of the will depend on the goodness of the end intended.
On the contrary, Augustine says (Confess. ix, 3) that God rewards the intention. But God rewards a thing because it is good. Therefore the goodness of the will depends on the intention of the end.
I answer that, The intention may stand in a twofold relation to the act of the will; first, as preceding it, secondly as following [*Leonine edn.: 'accompanying'] it. The intention precedes the act of the will causally, when we will something because we intend a certain end. And then the order to the end is considered as the reason of the goodness of the thing willed: for instance, when a man wills to fast for God's sake; because the act of fasting is specifically good from the very fact that it is done for God's sake. Wherefore, since the goodness of the will depends on the goodness of the thing willed, as stated above (AA,2), it must, of necessity, depend on the intention of the end.
On the other hand, intention follows the act of the will, when it is added to a preceding act of the will; for instance, a man may will to do something, and may afterwards refer it to God. And then the goodness of the previous act of the will does not depend on the subsequent intention, except in so far as that act is repeated with the subsequent intention.
Reply to Objection 1: When the intention is the cause of the act of willing, the order to the end is considered as the reason of the goodness of the object, as stated above.
Reply to Objection 2: The act of the will cannot be said to be good, if an evil intention is the cause of willing. For when a man wills to give an alms for the sake of vainglory, he wills that which is good in itself, under a species of evil; and therefore, as willed by him, it is evil. Wherefore his will is evil. If, however, the intention is subsequent to the act of the will, then the latter may be good: and the intention does not spoil that act of the will which preceded, but that which is repeated.
Reply to Objection 3: As we have already stated (A, ad 1), "evil results from each particular defect, but good from the whole and entire cause." Hence, whether the will tend to what is evil in itself, even under the species of good; or to the good under the species of evil, it will be evil in either case. But in order for the will to be good, it must tend to the good under the species of good; in other words, it must will the good for the sake of the good.