If you have time - Terminal 3 is the only terminal you can enter at Heathrow from airside without needing a boarding pass for a departing flight from there. This is mostly to support the paid-for lounges in the Terminal, but handily would work for you.
Assuming you have lots time, on arrival at T3, follow the purple "Flight Connections" and then "Flight Connections Terminal 3". Go through security, if asked for a boarding pass say you're going to the No.1 Traveller lounge (they normally don't). When you're through security, look closely at where you are! You'll need to get back here!
Now, head to the WH Smiths Bookshop in T3. Note, it's a different shop to the normal WH Smiths, which will have some books but not many. Browse their fairly good selection, and get what you want.
Return to Flight Connections, which isn't well signposted (to avoid confusing people), so you need to remember where it was!
Take the bus to Terminal 2, and go through security again
If you couldn't get what you wanted, try the normal WH Smiths in Terminal 2 (some books, mostly food and magazines), or failing that Case (travel bags and accessories, but often has a rack of guidebooks too)
If you don't have lots of time, just go to T2 and try to shop there.