The policy mirrored Australian housing policy, Mr Shearer said.
The party would allow foreigners to build houses here because that "increases the housing stock", he said.
Prime Minister John Key said there was a limited number of overseas-based foreign home buyers.
"So the reality is that not that many people come in and buy properties that aren't either permanent residents or aren't going to take up personal residencies."
There were also ways to "get around that system", he said.
It was unlikely to be the determining factor in the shortfall in the housing sector, he said.
"The number of people who live overseas who are not going to be permanent residents, who are not going to be citizens...I would have thought is pretty small."
Housing Minister Nick Smith said it was a sign of how desperate Labour and Mr Shearer had become.
"The oldest trick in the political book, whether it be over crime or unemployment or affordable housing, is always to blame the foreigners.
"There's no evidence that overseas buyers are having any discernible affect over house prices."
It was an "unprincipled" policy because it exempted Australia, Dr Smith said.
"They are the largest group of non-resident home buyers."
Property commentator Olly Newland said the policy would not work.
Australians would be exempted from the scheme, because of a reciprocal arrangement where New Zealanders were able to buy properties there.
Mr Newland said that made the policy "a bit of a nonsense" because Australians bought the highest number of properties here of all foreign buyers.
"Secondly, of course, any overseas buyer would very quickly find somebody else to buy a house for them here in their name and hold it in trust for them.
"There are a thousand ways to get around it if they want to come here," he said.
"It sounds good but in practice it just won't work."
Real Estate Institute of New Zealand chief executive Helen O'Sullivan said she was interested in knowing more details behind the policy.
"At first blush it sounds very simple but the devil will be in the detail."
She was interested to know how the policy would be enforced.
"The biggest issue for real estate agents would be the workability of it, so would you be needing to ask for passports at open homes?"
Green Party leader Russel Norman has welcomed the policy and believed it would make a "significant" difference to first home buyers.
The policy was in place in a number of other countries and worked well, he said.
"There will always be people who try to get around the law, but that doesn't mean that you don't have rules in place."
He denied the policy was xenophobic.
"If you want to come here and live here and become a permanent resident or citizen, then you would be eligible to buy houses."
Foreign buyers had already bought a number of houses that had pushed up the price of real estate here, Dr Norman said.
But he said it wasn't too late to change the real estate landscape.
- additional reporting Adam Bennett