Hadith - al-Tirmidhi # 2151. [Classed as saheeh by al-Haakim, 1/699, and al-Dhahabi agreed with him. It was classed as hasan by al-Haafiz ibn Hajar in Fath al-Baari, 11/184]
The happiness of the son of Adam depends on his being content with what Allah has decreed for him, and the misery of the son of Adam results from his failure to pray istikharah, and the misery of the son of Adam results from in his discontent with what Allah has decreed for him.
To make the prayer of Istikharah (say: iss-teh-KHAR-uh), one should pray two non-fard (non-obligatory) rakat (units) of prayer, even if they are of the regular sunnah prayers or a prayer for entering the mosque, and so on, during any time of the day or night.
One should recite in them whatever one wishes of the Qur'an, after reciting al-Fatihah. Then one should praise Allah and invoke blessings upon the Prophet, peace be upon him.
"Allahumma inni astakhiruka bi'ilmika. wa astaqdiruka bi-qudratika, wa as'aluka min fadlika al-azimfa-innaka taqdiru wala aqdiru, wa ta'lamu wala a ' lamu, wa anta 'allamu-l-ghuyub.
Allahumma, in kunta ta' lamu anna hadhaI-amra khairun lifi dini wa ma'ashi wa aqibati amri (or 'ajili amri wa'ajilihi) f aqdirhu li wa yas-sirhu li thumma barik li fihi, wa in kunta ta'llamu anna hadha-l-amra sharrun lifi dini wa ma'ashi wa-aqibati amri (orfi'ajili amri wa ajilihi) fasrifhu anni was-rifni'anhu.
Wa aqdir li al-khaira haithu kana thumma ardini bihi"
(O Allah ! I ask guidance from Your knowledge, and Power from Your Might and I ask for Your great blessings. You are capable and I am not. You know and I do not and You know the unseen. O Allah! If You know that this thing is good for my din and my subsistence and for my Hereafter - (or say, If it is better for my present and later needs) - then ordain it for me and make it easy for me to obtain, and then bless me in it. If You know that this thing is harmful to me in my din and subsistence and in the Hereafter--(or say, If it is worse for my present and later needs)--then keep it away from me, and keep me away from it. And ordain for me whatever is good for me, and make me satisfied with it)."'
The Prophet, may peace be upon him, added that then the person should mention his need."
There is nothing authentic concerning anything specific that is to be recited in the prayer nor is there any authentic report concerning how many times one should repeat it.
An-Nawawi holds that "after making istikharah, a person must do what he is wholeheartedly inclined to do and feels good about doing and should not insist on doing what he had desired to do before making the istikharah. And if his feelings change, he should leave what he had intended to do, for otherwise he is not leaving the choice to Allah, and would not be honest in seeking aid from Allah's power and knowledge. Sincerity in seeking Allah's choice, means that one should completely abandon what one desired oneself."
Surah Ghafir
39. "O my people! Truly, this life of the world is nothing but a (quick passing) enjoyment, and verily, the Hereafter that is the home that will remain forever."