Ed Miliband audaciously excluded Labour's top economic specialists, Ed Balls and Yvette Cooper, from the heart of Labour economic policy-making today, refusing to back their call for a major shift away from the party's pledge to halve the deficit over four years.

Cooper was instead appointed shadow foreign secretary, and given responsibility for equalities, while her husband, the pugnacious Balls, was appointed shadow home secretary.

In an attempt to heal the still raw wounds inside the party, the new leader surprisingly handed the shadow chancellorship to the experienced Alan Johnson, the first supporter of David Miliband's leadership campaign.

Johnson said that the former chancellor Alistair Darling had "got it just about right" in proposing before the election to halve the deficit over four years. The Labour position represents a £40bn smaller fiscal consolidation over the parliament than the government's. In a joke that highlights his economic inexperience compared with Balls, Johnson said his first task in the new job would be "to pick up a primer of economics for beginners".

Some Ed Miliband supporters argued that the Labour leader had also spurned Balls because he could not be trusted politically. One said Balls "shafted himself" by his near-public bid for the job.

In other developments:

• Andy Burnham was appointed shadow education secretary and election co-ordinator.

• The task of challenging Andrew Lansley's increasingly controversial health reforms has been handed to John Healey, one of nine Yorkshire MPs in the shadow cabinet. Twelve of the 27-strong shadow cabinet are women.

• Policy rebuilding has been given to Peter Hain, as the new chair of the party's policy forum, and to Liam Byrne as Cabinet Office minister in charge of policy.

• Lord Mandelson, writing in the Guardian, describes the process of shadow cabinet election as "an absurdity", but admits that New Labour had lost out because in government it had been too lazy to organise the grassroots, acting as if the nitty gritty of such work was beneath it.

Reflecting on the reasons for David Miliband's defeat in the leadership election, Mandelson frankly admits that New Labour was "too overbearing towards those who wanted quite legitimately to question or debate issues of policy, and they were pushed partly as a result into the arms of those who wanted to strangle New Labour at birth".

Johnson's appointment as shadow chancellor will be a relief to those in the centre and on the right of the party. He has only a fortnight to set out a reworked policy on the deficit before the government's spending review on 20 October, and to work out the level of coalition spending cuts that it is politically credible for Labour to oppose.

Miliband offered the job to Johnson on Thursday night, and he accepted immediately. Balls, the frontrunner for the role, admitted he was surprised, and was said to be disappointed but phlegmatic.

A few weeks ago Johnson had not been keen on the job. He was branded by the Conservatives as a caretaker from the old generation.

In making the decision that could yet define his leadership, Miliband had a series of private discussions with Balls in recent weeks. Balls argued the recent slowdown in the US, Ireland and mainland Europe meant Labour should argue against the Tories in classic Keynesian terms that to cut the deficit now risks hastening recession, and ultimately a bigger deficit.

Cooper, who received the most votes in the shadow cabinet election, held separate talks with Miliband, and from a different perspective argued that Labour's deficit reduction plans would lead to massive public sector job losses that the private sector could not replace.

Neither Balls nor Cooper has set out precisely how much more slowly the deficit should be cut. But both recognise that their macro-economic stance is different from that of Ed Miliband.

Johnson started marking out his ground, saying the government was going "too deeply and quickly", adding: "Our starting point has been to halve the deficit in four years. I don't agree Alistair's proposals were over too short a period. I think that he got it just about right, but nothing is preserved in aspic. There have been developments since the election and we need to take all those into account."

Government plans to cut spending by 25% in many departments risked "creating mayhem", he said. "These are cuts of a scale which we have never seen before."

"There is an alternative," he added. "The government is saying there is no alternative. They are saying it is unavoidable. It is avoidable."

He said he would not oppose government measures "for the sake of it" and would work with Miliband to develop a "real and responsible" alternative to the coalition's plans.

"We are both passionate about a new kind of politics where we will not disagree with our political opponents for the sake of it," Johnson said.

In the wider reshuffle, Sadiq Khan, who was Ed Miliband's campaign manager in the leadership election, was given the post of shadow justice secretary. He will also develop the party's approach to constitutional reform, shadowing the policy portfolio of the deputy prime minister, Nick Clegg.

Douglas Alexander, who managed David Miliband's campaign, has been given the key task of shadowing the welfare plans being drawn up by Iain Duncan Smith. David Miliband's other campaign manager, Jim Murphy, has been handed an equally important brief of shadowing defence at time of big cuts and plans to bring British troops home from Afghanistan by 2015. Caroline Flint, who quit the frontbench in protest at Gordon Brown's leadership, is made shadow communities and local government secretary, shadowing Eric Pickles.

New shadow cabinet entrants include Meg Hillier, who gets Ed Miliband's old shadow energy and climate secretary job, while Ivan Lewis gets the culture, media and sport brief. Maria Eagle is shadow transport secretary, while her twin sister, Angela, is shadow chief secretary to the Treasury.