There had been indications that Mr Shearer was about to break out with something guaranteed to give him time in the sun after he sacked a chief of staff and reappointed a former staff member who had resigned to follow her partner north.
Constant rumours about how many days Mr Shearer had left as Labour leader have been undermining his authority - not only in his own party but also in the wider electorate. Poll ratings have been abysmal.
Simply put, Mr Shearer needed something. It is no coincidence the policy of restricting non-residents buying property comes with the return of Fran Mold, a smart political operator, as chief of staff.
Depending on which people you listen to, Mr Shearer either has to make a mark before Labour's annual conference in November or be ousted; or Labour MPs are determined not to fall into a trap being laid by outside commentators and Mr Shearer will lead the party into the next election.
There remains an element of New Zealand society which objects to the so-called invasion of the country by foreigners. New Zealand First leader Winston Peters hits the race-card button at each election.
Former National Party and Act New Zealand leader Don Brash nearly won National an election with a race-tainted speech at Orewa, the traditional stamping ground for pivotal policy speeches.
The Green Party has long advocated restrictions on overseas ownership of New Zealand land and other assets.
What this announcement will likely do is take support away from the Greens and NZ First - the parties with which Labour would have hopes of partnering to form a coalition government after the election.
So it is no surprise that Mr Shearer now says Labour will restrict almost totally foreign ownership to buy established houses. He says it follows the Australian example, which has been in place a long time.
And it will give first-time buyers in New Zealand a better chance of securing affordable housing.
What is missing from the policy, however, is excluding Australians from buying property in New Zealand when they are one of the largest overseas purchasers.
A reciprocal agreement with Australia makes such a ban difficult to implement, but if Mr Shearer is serious about making housing affordable for first-time buyers, then Australians should have been on his list.
Commentators have labelled the policy as xenophobic and racist but there will be many who agree with Mr Shearer. In fact, the policy is based on residency, not race, although Asian property speculators will be seen as the target for the policy.
Foreigners will be allowed to build new houses, thereby increasing housing stock.
Housing is National's weak point, despite Prime Minister John Key saying first-home buyers were a priority for both himself and the Government. Freeing up land for building new houses is the Government's main policy thrust in an effort to bring down prices.
Top-ranking Cabinet ministers took to social media to denounce the Labour housing restrictions, a sign many took as one of concern for their own party's poll ratings.
This is a difficult time for Mr Shearer. Labour has been holding back policy until closer to the election, but his very survival as leader depends on lifting the party's polling popularity.
Former Labour prime minister Helen Clark led the party when it languished in the polls for several years.
After staring down an attempt to force her to step down, Miss Clark went on to become New Zealand's first elected woman prime minister and remained in that role for nine years. Releasing populist policy may be the key to the survival of the current Labour leader.
The speculation is that Mr Shearer has a divided caucus.
If so, it appears Labour's MPs cannot agree on a replacement and, until they do, Mr Shearer is safe.
Lifting his profile, as he has already done through the housing announcement, will make it more difficult for a replacement to be anointed.
If Mr Shearer wants to remain leader, he needs to continue to assert himself publicly and privately in ways he feels most comfortable.