How to manually define the primary loop

WordPress is not the solution to world hunger, global warming, and not even a good tool to create a one page apps in. If that is what you need, there are probably much better tools that will give you a much better ROI.

In theory you can use wordpress as an API, creating an “headless” site, but 95% of the advantage in using wordpress is the themes and plugins, and none of them support such a configuration. Therefor if you want to use plugins like woocommerce you are left alone in the dark and rain to figure out how to use their API to integrate with your JS, and you are lucky here, because for most other plugins you will have to write an API by yourself.

To add to that, wordpress really sucks at ajax. The overhead of loading ajax makes processing AJAX request comparable performance vice to just getting the whole page, especially if you use object cache (which obviously you do, right? no one in 2017 sets up wordpress without it).

Specifically for your question. You can always use the pre_get_posts filter to set whatever is needed to simulate a main loop. Still this is just your first step in a road full of pain and tears (do you need seo for a shop? probably no, ranking in google is overrated)