By now, you may know that Sir John Templeton died this summer after a long, successful life of investing and philanthropy. In 1999, Money magazine called him "arguably the greatest stock picker of the century." His flagship fund, Templeton Growth, returned an average of more than 15% annually for 45 years, turning $10,000 in 1954 into $5.5 million by 1999. That's a fantastic record, however you slice it.

Of the many lessons we could learn from Templeton, three are most important in this market.

1. Don't gamble with your money
First, figure out what you're doing. If you're speculating, you might as well go to Las Vegas. As Templeton said:

Invest -- don't trade or speculate. The stock market is not a casino, but if you move in and out of stocks every time they move a point or two, or if you continually sell short, or deal only in options, or trade in futures, the market will be your casino. And, like most gamblers, you may lose eventually -- or frequently.

He went on to quote Lucien O. Hooper: "What always impresses me is how much better the relaxed, long-term owners of stock are with their portfolios than the traders with their switching of inventory. The relaxed investor is usually ... more patient and less emotional, pays smaller annual capital gains taxes, and does not incur unnecessary brokerage commissions."

Real returns come from the growth of the underlying businesses -- and companies are still making money, despite any recession. When you buy shares of firms such as Procter & Gamble (NYSE:PG) and McDonald's (NYSE:MCD), both of which continue to grow earnings, you're not speculating. You're investing in their ability to continue to provide the goods and services they sell, and to steadily earn money even in bad times.

2. Buy low, sell high, and mean it
Everyone knows they should "buy low" and "sell high" -- but when prices are truly low, most investors are running scared. Said Templeton:

When prices are high, a lot of investors are buying. Prices are low when demand is low, investors have pulled back, people are discouraged and pessimistic. ... Yes, they tell you: 'Buy low, sell high,' but all too many of them bought high and sold low. And when do they buy? The usual answer: 'Why, after analysts agree on a favorable outlook.' This is foolish, but it is human nature.

To really profit in the stock market, you've got to buy low -- and that means buying when pessimism runs rampant.

Many companies have fallen a long way from their highs. Boeing (NYSE:BA), Monsanto (NYSE:MON), and NYSE Euronext (NYSE:NYX), for example, have each grown earnings by at least 34% a year over the past three years -- but each is also at least 25% off its 52-week high.

By investing now in companies like these, you're positioning your portfolio for great returns when the bull market does return.

3. Diversify, diversify, diversify
You're going to make mistakes. Templeton, master investor though he was, said that one-third of his investments were bad:

No matter how careful you are, no matter how much research you do, you can neither predict nor control the future. A hurricane or earthquake, an unexpected technological advance ... or a ... product recall -- any one of these can cost a company millions of dollars. Also, what looked like such a well-managed company may turn out to have serious internal problems that weren't apparent when you bought the stock. So you must diversify -- by company, by industry, by risk, and by country.

In other words, diversification helps us all minimize the effect of risk in our portfolios. Shares in Petroleo Brasileiro (NYSE:PBR), for example, provide exposure to the energy sector, South America, and a mega-cap business all at once, while investing in Diageo (NYSE:DEO) opens up the beverages industry while giving us some European exposure, too.

So where does that leave us?
Following these lessons from one history's best investors will help you profit from this bear market -- and prepare for the next bull market.

Tom and David Gardner, co-advisers to the Motley Fool Stock Advisor investment service, have taken Templeton's lessons to heart. They practice a long-term investing strategy that doesn't twitch at every market movement, while continuously looking for good companies selling at compelling price points. Even in this terrible market, their picks have managed to beat the S&P 500 by 40 percentage points on average. If you'd like to see what they're recommending now, click here to get a 30-day free trial -- there's no obligation to subscribe.

Jim Mueller hopes he lives as long as Templeton did while doing as well. He didn't have a position in any company mentioned at the time of publication. NYSE Euronext is a Motley Fool Rule Breakers choice while both Petrobras and Diageo are Income Investor choices. The Fool's disclosure policy doesn't drink and trade at the same time.