* TSX rises 78.62 points, or 0.63 percent, to 12,540.81 * All 10 main index sectors advance * Shoppers shares jump 27 percent * Gold-mining shares climb with bullion By John Tilak TORONTO, July 15 (Reuters) - Canada's main stock index advanced on Monday to its highest in more than a month, boosted by gains in Shoppers Drug Mart Corp after grocer Loblaw Cos Ltd agreed to buy the pharmacy chain for C$12.4 billion ($11.9 billion). Investors also digested data showing the Chinese economy slowed in the second quarter and U.S. retail sales rose less than expected in June. Shares of Shoppers, the country's biggest pharmacy chain, shot up 27 percent and had the biggest positive influence on the market. Facing heightened competition from Target Corp and Wal-Mart Stores Inc, Loblaw said it would create a retail giant with more than C$42 billion in revenue and gain access to the growing small-urban store sector. "The market is quite encouraged by the Loblaw-Shoppers deal. It makes a lot of sense," David Cockfield, managing director and portfolio manager at Northland Wealth Management said. "A lot of it is about competition, but it's also about diversification," he added. "They're really structuring themselves more toward the Wal-Mart formula." The Toronto Stock Exchange's S&P/TSX composite index was up 78.62 points, or 0.63 percent, at 12,540.81, after reaching 12,549.11, its highest since June 5. Cockfield said investor sentiment appeared to be rebounding and the Canadian index could hit the 13,000 mark if the momentum continued. All of the 10 main sectors on the index were higher. Financials, the index's most heavily weighted sector, rose 0.5 percent. Royal Bank of Canada, the country's biggest lender, climbed 0.5 percent to C$62.13, and Bank of Nova Scotia was up 0.7 percent at C$57.47. Gold miners drove gains in the materials group, which climbed 0.3 percent. They benefited from a higher bullion price. Barrick Gold Corp added 1.7 percent to C$15.75. Shares of energy producers rose 0.2 percent. Shoppers rose to C$61.27, and Loblaw gained 8.6 percent to C$51.65. The two stocks helped lift the consumer staples sector up 8 percent.