Cameron, who became the first western leader to visit Islamabad since election of Sharif in May, said Britain and Pakistan had a shared interest in the "battle against terrorism".
"This is a battle that requires a tough and uncompromising security response. But it is also a battle that has to go so much wider. Countering extremism and radicalisation, investing in education, tackling poverty, dealing in all the issues that can fuel extremism and radicalisation," he said.
"We will stand together and conduct this fight against extremism and terrorism," Cameron said at a joint press conference with Sharif.
Advocating strong Af-Pak ties, the British prime minister said, "I profoundly believe that a stable, prosperous, peaceful and democratic Afghanistan is in Pakistan's interest, just as a stable, prosperous, peaceful and democratic Pakistanis in Afghanistan's interest."
Cameron told Sharif he knew he and Afghan President Hamid Karzai "will work together towards those ends."
Responding to Cameron's appeal, Sharif said, "I have assured Prime Minister Cameron of our firm resolve to promote the shared objective of a peaceful and stable Afghanistan, to which the three million Afghan refugees currently living in Pakistan can return with honour and dignity."
Sharif said he had assured Cameron "of our shared resolve to seek a peaceful and stable Afghanistan".
Cameron, who arrived here after an unannounced trip to Kabul, said, "The UK will provide more equipment to tackle the scourge of improvised explosive devices. We will also support Pakistan in improving the security of its infrastructure‚ including safeguarding sporting events."
The British prime minister pledged to increase bilateral trade to USD 3 billion pounds by 2015. Both the sides also agreed to encourage strong participation for investment in the energy sector.
The UK will continue to play its leading role in the international community to support Pakistan to enhance economic growth‚ including through increased market access to the European Union.
Under the framework of the Enhanced Strategic Dialogue, the two governments will continue their regular dialogue on economic reform.
Besides, Sharif apprised Prime Minister Cameron of the ongoing Pakistan-India Peace process.
They underscored the importance of peace‚ stability and security in Afghanistan and reaffirmed their support for an Afghan-led and Afghan-owned reconciliation process.
Karzai is suspicious of the role played by Pakistan in the opening of a Taliban office in Doha, Qatar.
There are concerns in Downing Street that Sharif may be in danger of neglecting relations with Afghanistan amid historic and continuing enmity between the two neighbours.
Ties between Afghanistan and Pakistan are traditionally mired in distrust.
Sharif accepted an invitation to visit the UK to carry forward the process of enhancing cooperation between the two countries.
Talking to the leaders of Pakistan business community in Islamabad‚ Cameron said his country wants to expand trade and commercial relations with Pakistan through increasing bilateral relations.
He said his country will fully support Pakistan to get GSP Plus status‚ which will help give new boost to its trade with the European Union.
David Cameron said there are enormous investment opportunities for Pakistani investors in Britain.
Leaders of the Business community discussed ways to promote trade and investment between the two countries.
Sharif informed Cameron about his ambitious plans to enhance growth‚ create jobs and reduce poverty to create a brighter future for the people of Pakistan.
26/11 attack trial: New judge takes over in Pakistan
This is NO country for young men
Sextremists: There's no stopping these TOPLESS girls!
Google not obliged to delete sensitive search information
'Better Indo-Pak ties will improve situation in Afghanistan'