An easy way to do this is to use different template files for the different pages of the site. So for the homepage you would have a homepage.php template, for the store pages you would have a store.php template page.
In your header.php you write the following:
What the code is doing is checking to see what template the page is using, and only loading the files if it’s using a certain template. So in this example, it’s looking to if the current page is using the store template, and loading the Foxy Cart files if it is.
A simple way to help keep your code clean and maximize page load time.