So far the economy is handling high oil prices. But here comes heating season. Get ready for ...

(FORTUNE Magazine) – Americans may not be happy about spending $40 for a tank of gasoline, but they're coping. Shoppers are making fewer trips to the mall. Bicycle sales are booming. Even carpooling is back in reports a fourfold increase in commuter carpooling listings since June. The net result: a 3% drop in U.S. gasoline consumption during the four weeks ended Oct. 1.

Problem is, just as we're adapting to one energy shock, another is lurking in our boilers and furnaces. The price of natural gas has doubled since June, rising from $6 to $13 per million BTUs. In northern climes many homeowners could see a $100 increase in their monthly heating bills. The implications for investors will be profound--and not just for energy stock aficionados. "It's the single biggest issue out there for the stock market, yet most investors have their heads in the sand," says Wendell Perkins, manager of the JohnsonFamily Large Cap Value fund. "We're talking about $100 a month families won't be spending at malls, movie theaters, and restaurants."

Perkins is so concerned that he recently unloaded large positions in Wendy's and Federated Department Stores. Four of his top five holdings are now oil companies: Marathon Oil, ConocoPhillips, Chevron, and Anadarko. Still, his outward decisiveness belies inward uncertainty over how he should proceed. If prices stagnate or fall, Perkins knows Big Oil is going to have a hard time increasing earnings. "There's danger, no doubt," he says. "It's been a difficult thought process." It's a thought process that's been further complicated by his fears of a recession.

Wall Street economists haven't uttered the R-word much, but the fact is we have all the classic ingredients for one: war, rapidly rising energy prices, Federal Reserve rate hikes, and a mortgage-refinancing boom finally running out of steam. If there were a recession in 2006--or even just a slowdown--demand for gas and oil would wane right along with construction, manufacturing, and the number of commuters.

Already there are signs that energy prices may have peaked. Oil prices fell 10% in early October, a decline that scared the bejesus out of the hot money that's been chasing oil stocks this year. Exxon Mobil shares fell 10% in little over a week. A year ago Merrill Lynch market strategist Richard Bernstein might have viewed that as a buying opportunity. Not today. "Demand [for energy] has been slowing, and supply has been starting to expand--China is now a net exporter of refined product," Bernstein says. "I don't think this is the right point to start initiating energy investments."

We aren't as pessimistic as Bernstein, but we do think it is a good time to be cautious. One way to hedge your bet is to avoid pure exploration and production companies like Anadarko and Kerr-McGee, which are highly sensitive to the price of oil and gas. Instead, favor the big, integrated oil companies that make money not only from upstream crude production but also from downstream operations such as refining oil into gasoline, diesel fuel, and petrochemicals, and marketing gas directly to consumers. Downstream businesses make their money on the spread between the price of crude and the price of refined products, and that spread usually widens when crude prices are falling. "In this environment, what I want to do is take my bet away from crude oil and move it downstream," says David Talbot, an analyst with energy research firm John S. Herold. "That way you've got your finger in all the pies."

Among the integrateds, the most conservative investment is also the best-run company: Exxon Mobil (XOM, $58). The stock used to trade at a substantial premium to its peers, but with legendary CEO Lee Raymond about to step down, this premium has diminished. Exxon trades at 11 times expected 2005 earnings, which is only one point more than BP or Royal Dutch. The average gap over the past five years has been three points. T. Rowe Price energy analyst Tim Parker smells a buying opportunity. "Lee Raymond or no Lee Raymond, the whole culture of Exxon is very cost-conscious," says Parker. "You know they're not going to do anything stupid." Exxon has also been buying back stock at a furious pace--1% of outstanding shares per quarter, according to Deutsche Bank analyst Paul Sankey--which is one reason Sankey thinks the stock could climb $16.

Another attractive though lesser-known name is Total (TOT, $126), the French oil giant. Trading at nine times 2005 earnings, Total is Europe's leading refiner, which means it's poised to profit from widening refining margins. Upstream, it's boosting oil- and gas-drilling production at a 4.5% annualized rate, second best among the major oil companies. On the downside, Total's dividend comes up a bit short, at 1.6%, although Citigroup analyst Jonathan Wright is predicting a 20% dividend hike. Another drawback (at least for U.S. shareholders): Because Total is based overseas, returns are affected by exchange rates.

Oilfield service and technology companies also give investors energy exposure without overexposure to the vagaries of commodities markets. With rig counts up 40% since last year and Big Oil pouring billions into new exploration, these are boom times for the likes of Halliburton (HAL, $59), Baker Hughes (BHI, $53), and Schlumberger (SLB, $79), all on pace to improve earnings 50% or more this year. Price/earnings ratios range from 25 for Schlumberger to 20 for Halliburton.

Two smaller players Parker really likes are Cooper Cameron (CAM, $68) and FMC Technologies (FTI, $37), both of which make, among other things, the subsea wellheads that control the flow of oil and gas from underwater wells. "Think of the difficulties of controlling oil and gas in a pressured environment on land, and then think about the difficulty of doing this at sea in maybe 1,000 feet of water," says Parker, who is predicting a surge in deep-water drilling. "The wellheads need to be highly engineered products, and these two companies have the technology the oil companies trust."