Intelligence agencies play a BIG role in foreign policy if any major country. Who do you think shaped Americas policy during the cold war? Who created the Taliban? Who ran the war in Vietnam? Who gave the courage to Indira Gandhi to go ahead with the break up of Pakistan and create Bangladesh? It was RAWs biggest achievement.
ISI has always shaped Pakistans policy there is no two doubts about it. Along with the army, they are just biding time while they are the focus of the war on terror. One wrong move by the "democratic" government and that will be the end of it.
For India to resolve any issue including Kashmir, it has to have a deal with the ISI/PA. Without them there is going to be no peace.