It really depends on what that code is doing, how does it affect the website, do you need to handle concurrency?
If you're using Master Pages (i hope you are), just put the code in one of the Page-level event handlers there, where all your pages derive from. If you have multiple master pages, these should themselves have a master, so in that case you could put it there.
Again though, it depends on that code - what it is doing? The fact it returns void scares me - sounds like you are changing the state of something.
Generally if you need to execute some arbitrary code (and thats all i know about your example, that it is 'some code') on every page request, it sounds like a case for a static method/property. I dont like the sound of "newing-up" a Basket on each page? Are you planning on creating/disposing of a "Basket" object on every single page request?