General Motors' (NYSE:GM) shares are down 17% year to date, a pullback that has come as the company addresses problems with ignition switches in its vehicles that have been linked to 32 accidents and 13 deaths. 

Due to the market's reaction during the recall scandal, now could be a great opportunity for buying GM.

What's actually going on?
GM is putting aside some $750 million to cover repair and rental expenses for the cars that were recalled. Of course, this isn't the company's first brush with quality issues; it has bounced back in the past. Toyota (NYSE: TM) also had one of the largest recalls in history back in 2010 due to unintended acceleration issues, and the automaker has rebounded nicely; it has been the top automaker by global sales for the last two years.

The problem with the faulty ignition switches, which were manufactured by Delphi Automotive, is that they could shift into a position to shut down engines unexpectedly, making power brakes, power steering, and airbags inoperable. It's been reported that Delphi informed GM in early 2002 that the switches were underperforming, which means that GM sat on the problem for more than 10 years. Apparently, the recall was put off because the cost of additional tooling would be in the region of $400,000, which doesn't seem so bad now in comparison to $750 million. 

GM has recalled 2.6 million vehicles since February, putting the total at 7 million vehicles. In addition to the $750 million set aside, the company could face civil fines, which could reach $50 million. However, the financial implications probably are not as serious as the damage done to the brand's image.

GM has argued against a full-blown recall that would take cars off the road on the grounds that the vehicles are safe to drive if the recall instructions are followed. The company has argued that a park-it alert would significantly affect the company financially and cause irreversible damage to its reputation.

Shares really took a tumble after Morgan Stanley downgraded the stock to underweight at the beginning of the month on grounds that investor expectations about margins are inflated. Morgan Stanley came out and said that GM and its peers will face more problems as the auto industry throughout the world goes through a period of disruption and technological progress. The investment bank found that the tech used in vehicles is a top selling point -- the No. 1 selling point for almost 40% of buyers, well ahead of the 14% who use traditional metrics such as speed and power.

However, GM has been active on the technology side -- particularly in fuel cells. It has the highest number of fuel cell patents filed in the U.S. between 2002 and 2012. It's building a fuel cell development lab, and has a deal with Honda to jointly develop a fuel cell system by 2020. 

Quality control
GM's recent recall could allow Toyota to strengthen its lead in auto sales, while Ford might be able to gain market share in the U.S. GM was the top automaker in the U.S. in 2013, with nearly 17% market share. Meanwhile, GM is turning its focus to emerging markets, namely China and Brazil.

Even with the recent overhang from the recall, it's worth noting that all of GM's brands received above-average industry rankings from J.D. Power for quality control scores. General Motors also had the top-ranked vehicles in eight out of the 26 categories. Similarly, in the annual reliability rankings from Consumer Reports, GM is the highest-ranked American manufacturer .

GM now trades at a P/E under seven based on next year's earnings estimates (Ford trades at a P/E of eight, and Toyota at nine), and it now offers a dividend yield of 3.7%.

Bottom line
General Motors has a lot to prove to consumers about transparency and doing the right thing. But again, this isn't the first major auto recall, nor will it be the last. The key is addressing the issues head on and making marked improvements in quality control and oversight. There are times when horrible accidents and company missteps drag a company's stock price down, resulting in an attractive buying opportunity. For investors looking to gain exposure to one of the leading global automakers, General Motors might be such an opportunity now.

Marshall Hargrave has no position in any stocks mentioned. The Motley Fool recommends Ford and General Motors. The Motley Fool owns shares of Ford. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.