Shell made a profit in the quarter.
Shell reported record earnings for the second quarter in a row on Thursday, as the energy giant continues to prosper from high oil and gas prices.
Shell reported adjusted earnings of $11.5 billion for the second quarter. In the first quarter, Shell set a new record of $9.1 billion.
In the third quarter, Shell will set aside $6 billion to buy back shares in order to raise its stock price. The company said that it would not increase its dividends.
A tight global market for refining has helped Shell. About $1 billion was added to profits in the quarter because of what the company called "dislocation" in products.
Liquefied natural gas is in high demand and is supplied by Shell.
Ben van Beurden, Shell's chief executive, said that today's high energy prices were the result of global wholesale market conditions, as well as government policies that had discouraged investment in oil and natural gas in the past. He said that the best way for the company to lower prices was to invest in more energy sources.
He said that their role was to supply the energy the world needed.
Mr. van Beurden said that Shell would participate in a floating natural gas terminal in the Netherlands and invest in a large new gas field in British waters.