The incident happened in Angoor Adda Bazaar in the South Waziristan tribal district, one of the seven semi-autonomous regions where the Pakistani military has been battling Taliban and Al-Qaeda linked militants for more than a decade.
"One of the two rockets fired from Afghanistan's Birmal town hit a bread shop, killing three Afghan nationals who were residents of South Waziristan," a senior military official told AFP.
The second rocket fell in a secluded place.
The official said it was still unclear who had fired the rockets.
The bazaar had been closed for six months after skirmishes between Pakistani and Afghan troops over construction by Pakistan close to the border. Officials said it re-opened just a week ago.
Pakistan's mountainous western border became a hotbed of Islamist militants following the US-led invasion of Afghanistan in 2001.
(Reopens FGN 8)
Afghanistan is concerned about the sanctuaries and safe havens that the terror groups enjoy in Pakistan, with Rabbani hoping that the government in Pakistan "will take this issue seriously."
Rabbani said the US can play a role in persuading Pakistan to "change course and act in good faith."
"This is an important development," Rabbani said.
On whether Afghanistan has a vision on how it will manage its ties with India and Pakistan, he said Kabul's relation with one country is not at the expense of its relations with any other country.
"If you are close with one country, it does not mean we are moving away from other countries. We want to have good relationswith all the countries in the region, that includes Pakistan and India," he said.
