Dterminants of Pakistan's Foreign Policy

What are the determinant factors of foreign policy?There are many factors that truly contribute to the shaping of the foreign policy of a country. But all these factors can be divided into two classes. One is domestic factors and another is external factors. In domestic factors we can have factors of domestic importance like energy, agriculture, industrial importance, resources etc. for example India's growing economy demands huge energy for growth. It will mean that our foreign policy should be shaped such that our energy demands must be fulfilled with the help of other countries. In this regard India should make friendly relations with the countries having rich energy resources and try to help those countries in by investing in these countries in oil, gas etc. sector. So our domestic demands will direct our foreign policy. In the same way what happens at the international level does affect all the countries in some way...Directly or indirectly. So we have to see that particular event does not harm our national interests. In this way one would have to take a particular stand and take action according to that. for example India remained non-aligned after it's freedom so that it would not remain dependent on a particular country for it's development, and that helped India as Russia, America an other countries all helped it some way or the other. What are the basic determinants of a foreign policy?

Trade, risk to a nation's assets and/or citizens (domestic and overseas), risk to a nation and or its allies as a whole. Also, if you're talking about the US, a seeming high degree of irrationality and a suspicious amount of personal gain to those determining the policy (i.e. shareholders in military industries). The basic determinants of a foreign policy?