Sharif had not previously confirmed his party would join the PPP in forming a government.
Sharif, reading from the joint declaration, said: "The coalition partners PPP and PML-N undertake to form coalition partnership together for a democratic Pakistan, for translating the mandate given by the people of Pakistan to the democratic forces through the February 18, 2008 elections.
"The leadership was of the firm opinion that the coalition partners are ready to form the governments and the national and provincial assemblies should be convened immediately."
The two parties urged Pervez Musharraf, the Pakistani president, to convene parliament without delay and said the legislative body would restore judges ousted under a state of emergency.
Kamal Hyder, Al Jazeera's correspondent in Pakistan, said: "Both sides have reiterated that they are going to be talking about the restoration of the judiciary within 30 days after the parliament is convened.
|Police fired teargas at activists in Islamabad|
protesting over the judges' dismissal [AFP]
"There has been some confusion as to when parliament will be convened - that is the priviledge that the president will have to exercise and so far he has said it will be another two weeks."
The dismissed judges, including the supreme court chief justice, were seen as hostile to Musharraf's October re-election by legislators for a new five-year term as president while he was still army chief.
The judges are likely to take up legal challenges against Musharraf if they are restored.
Hundreds of lawyers across the country, meanwhile, launched a week of protests to press for the restoration of the judges.
It was a year ago on Sunday that Musharraf suspended the then chief justice, Iftikhar Chaudhry.
Witnesses said police fired teargas at the demonstrators in Islamabad, while both sides threw stones at each other.
The protesters, including lawyers, political party workers and civil society activists, were stopped by riot police at the barbed barricade erected outside Chaudhry's residence.