Shapps was reselected to fight Welwyn Hatfield in 2002 and continued his local campaigning over the next four years, he stood again in the 2005 election and was elected as the Conservative MP for Welwyn Hatfield, defeating the Labour MP and by then Minister for Public Health, Melanie Johnson. He received 22,172 votes (49.6%) on a 8.2% swing from Labour to Conservative, a majority of 5,946 (13.3%). During the four year campaign he is estimated to have outspent his opponent by twelve times. According to Simon Hoggart writing in The Guardian, Shapps had 22 pictures of himself in his election address, although Hoggart did concede that those who pitched "person" over "party" received better results in the 2005 election. The Welwyn Hatfield swing was the second highest Labour to Conservative swing of the 2005 election, Welwyn Hatfield was one of the most marginal seats in the country.
Shapps publicly supported David Cameron's bid for the leadership of the Conservative Party and signed Cameron's nomination papers. Upon Cameron's election as Party Leader Shapps was appointed Vice Chairman of the Conservative Party with responsibility for Campaigning.
Shapps was a member of the Public Administration Select Committee between May 2005 and Feb 2007, when he stood down in order to concentrate on his Conservative Front Bench Campaigning role.
In July 2007, Grant Shapps became Shadow Housing Minister attending Shadow Cabinet.
At a time when Prime Minister Gordon Brown has made housing a priority, Shapps is responsible for developing Conservative housing policy. He argues in favour of a community-led approach to solving the housing crisis and warns against the Government's strategy of top-down, Whitehall driven housing targets, which he believes have failed in the past. His Housing portfolio is considered to be one of the battlegrounds for the next British General Election. In his 2007 Party Conference speech on Housing, Shapps outlined a vision of localism being used to replace centrally imposed housing targets with the aim of creating more new build overall.
In May 2008 the parliamentary commissioner published a report into the funding of Shadow Cabinet offices. Shadow ministers are allowed to receive donations from organisations covered by their brief as long as the person has a company in the UK or lives in the UK. The Commissioner exonerated all shadow cabinet members involved. The funding, donated prior to Grant Shapps becoming Shadow Housing Minister, was used to fund four reports into homelessness and to create the Conservative Homelessness Foundation which was launched by David Cameron.
Since becoming Shadow Housing Minister, four of Shapps' reports have dealt with the causes and effect of homelessness from rough sleeping through to so-called "sofa surfing On Christmas Eve 2007, Shapps slept on the pavement of Victoria station in a sleeping bag, waking Christmas morning soaked from a downpour. Shapps says he wanted to draw attention to the fact that 130,000 children sleep rough every night, saying, "It served its purpose. Homelessness struggles to get on the news agenda and I wanted to try and highlight the plight of children who sleep rough every night". His work became sufficiently influential within the homelessness sector that when he launched the Homelessness Foundation with Conservative leader David Cameron in May 2008, leading lights from the sector including Chief Executives from charities like Shelter, Crisis and the Founder of the Big Issue, John Bird, all joined the Advisory Panel of the Conservative Homelessness Foundation. The Foundation's aim is to provide academic research into homelessness.