* H1 retail revenue up 20%

* Wins contract with Auchan in Spain

* Retains to FY outlook

* Shares up 2.8%

LONDON, July 6 (Reuters) - Britain's Ocado said demand for its grocery business and technology remained strong after it announced a 20% rise in first-half retail revenue on Tuesday and a new contract in Spain.

The online grocer said the pandemic had resulted in a permanent shift to web-based shopping, helping drive demand for groceries it sells with partner Marks & Spencer and for its technology which helps retailers expand online.

Its retail revenue for the 26 weeks to May 30, a period when Britain was mostly lockdown, rose 20% to 1.2 billion pounds ($1.66 billion).

As COVID-19 restrictions in the UK have eased, Ocado said that it was continuing to add new customers and while basket sizes had shrunk a little since restaurants had reopened, they were still larger than before the pandemic.

"We are confident Ocado Retail will continue to grow market share as we help them to roll out even more capacity," CEO Tim Steiner told reporters.

TECHNOLOGY CONTRACT

Ocado also announced its first new technology contract since the pandemic began as it signed up Auchan Retail to help expand the online business of its Alcampo supermarket chain in Spain.

Steiner said the deal "may open up other opportunities" with Auchan, a global grocery retailer.

The company also kept its full-year outlook and said it was comfortable with the consensus for group core earnings (EBITDA).

Ocado shares were up 2.8% to 2,041 pence at 0832 GMT.

"We see a new contract and encouraging newsflow around retail performance as encouraging," said Numis analysts in a note.

Ocado already has contracts for its robotic warehouse technology with supermarket groups including Kroger in the United States, Casino in France and Aeon in Japan.

Ocado shares are down 11% this year versus Britain's bluechip index which is up 11%. That weakness follows a surge in the stock in the early stages of the pandemic last year.

($1 = 0.7212 pounds) (Reporting by Sarah Young; editing by Kate Holton and Jason Neely)