I went to the market with a view to – a book.

Answer: 
buying
I went to the market with a view to – a book.