The song was recorded for the Beggars Banquet album in early June of 1968 at Olympic Studios in London. It clocks in at a long 6 minutes and 18 seconds, although Keith’s solo track is only a little over 2 minutes long. Keith also played bass on the track as well.
Parts of the recording were captured live in the Jean-Luc Godard film of the same name, so we can see it all actually going down. You can see the edited music video from the sessions at the bottom of the page.
It looks like Keith is playing his 1957 Les Paul Custom into what looks to be a Vox AC-30.
What you’ll hear on the isolated track is a lot Keith’s playing that didn’t make the final version (rightfully so), but it’s all there for the listen.