Shloka:
विद्यां ददाति विनयं, विनयाद् याति पात्रताम्।
पात्रत्वात् धनमाप्नोति, धनात् धर्मं ततः सुखम्॥
Words meaning:
विद्यां- Knowledge
ददाति- gives
विनयं- Decency/ humility
विनयाद्- Through the Decency/ humility
याति- achieves
पात्रत्वात्- through worthiness
धनमाप्नोति-Dhanam=Money/Wealth+Aapnoti= Gain
धनात्- Through Money/Wealth
धर्मं-Religion/ righteousness
ततः- From that
सुखम्- Happiness/Pleasure/ Health
Meaning of the Shloka:
Knowledge gives Decency/ humility, Through the Decency/ humility one can achieve - worthiness=the quality of deserving respect or attention, through worthiness one can gain the Money/Wealth, Through Money/Wealth one can follow Religion/ righteousness and From that Happiness/Pleasure/ Health can be gained. So the Knowledge is the fundamental basis for Happiness/Pleasure/ Health.
Nice