Sayyidi wa sanadi Shaykh Mufti Mohammad Taqi Uthmani (Allah preserve him) gave the following advice to a group of students,
1) Sacred knowledge is of no use or benefit to the aspiring students unless they act upon their knowledge and base their works upon it. And the most beneficial of works is that which brings one closer to the obedience of Allah Most High.
2) The students must purify their intention as to why they are seeking knowledge. Their intention must be purely and sincerely for the sake of Allah Most High.
3) The students should firmly adhere to the Sunnah (life-example) of the Prophet Muhammad (peace and blessings be upon him) in every aspect and circumstance of their life.
4) The students must be constantly turning back to Allah Most High (ruju’ ilal-Allah) through their life journey, in all situations. Returning means to seek help from Allah against all difficulties and challenges, to seek to please Him, to seek protection and forgiveness from Him, and to be grateful and humble to Him.
5) The student of knowledge must make lots of supplication (dua’) to Allah Most High, for every single one of his needs, whether they be needs of this world or the next.
Source: Seekers Guidance (with minor changes)