Firstly in an analogue ways - managers are always watching were customers are going/ what they are looking at/etc. The security team at a one co-op bragged that their cameras could read the time on your watch.
Secondly, there are all sorts of new tools stores are trying out to automate this. Software that analyzes footage to generate heatmaps. Or using the in-store wifi access points to generate heatmaps (even if you don't connect, your phone will give away your position when looking for networks). This is especially important in mall settings where they need to calculate foot traffic estimates as a way of pricing storefronts.
https://www.getblix.com/retail-foot-traffic
https://www.aislelabs.com/products/flow/
https://documentation.meraki.com/MR/Monitoring_and_Reporting...
Esp. since COVID I imagine a lot of people inputting their passwords in front of a camera at the register.
Stores would pay for the inventory, but we would rebate them for what would not sell as an incentive to make sure we put out products that actually sold.
But I would literally come in every day to the larger stores and put product on the shelf and argue with the manager about inventory and clean up our area.
None of the stores I worked at explicitly sold shelf space (I think), but our corporate worked with their corporate to determine how much space in each store would maximize their revenue. I am sure newcomers would have to do extra to guarantee they would make enough money for the stores to take risks on them.
Needless to say, they had all of our sales data when it came to developing store brands.