The ultimate felicity of man consists in the contemplation of God
Summa Contra Gentiles, Book III, c. 37
So, if the ultimate felicity of man does not consist in external things which are called the goods of fortune, nor in the goods of the body, nor in the goods of the soul according to its sensitive part, nor as regards the intellective part according to the activity of the moral virtues, nor according to the intellectual virtues that are concerned with action, that is, art and prudence we are left with the conclusion that the ultimate felicity of man lies in the contemplation of truth.
Indeed, this is the only operation of man which is proper to him, and in it he shares nothing in common with the other animals.
So, too, this is ordered to nothing else as an end, for the contemplation of truth is sought for its own sake.
Also, through this operation man is united by way of likeness with beings superior to him, since this alone of human operations is found also in God and in separate substances.
Indeed, in this operation he gets in touch with these higher beings by knowing them in some way.
Also, for this operation man is rather sufficient unto himself, in the sense that for it he needs little help from external things.
In fact, all other human operations seem to be ordered to this one, as to an end. For, there is needed for the perfection of contemplation a soundness of body, to which all the products of art that are necessary for life are directed. Also required are freedom from the disturbances of the passions - this is achieved through the moral virtues and prudence - and freedom from external disorders, to which the whole program of government in civil life is directed. And so, if they are rightly considered, all human functions may be seen to subserve the contemplation of truth.
However, it is not possible for man's ultimate felicity to consist in the contemplation which depends on the understanding of principles, for that is very imperfect, being most universal, including the potential cognition of things. Also, it is the beginning, not the end, of human enquiry, coming to us from nature and not because of our search for truth. Nor, indeed, does it lie in the area of the sciences which deal with lower things, because felicity should lie in the working of the intellect in relation to the noblest objects of understanding. So, the conclusion remains that man's ultimate felicity consists in the contemplation of wisdom, based on the considering of divine matters.
From this, that is also clear by way of induction, which was proved above by rational arguments, namely, that man's ultimate felicity consists only in the contemplation of God.
Summa contra Gentiles, Book III, c. 37, translated by James F. Anderson (Notre Dame - London: University of Notre Dame Press, 1995), pp. 123-125.