All private shopping sites that I know of don't even show their content to anyone that is not signed in. You could choose to show your content to everyone, but then it's simply a shopping site.
Asking someone to sign up or log in to your site is a barrier that has a chance of pushing them away. So you should present the barrier at the time when you have the lowest chance of doing that. Psychologically, that is less likely after someone has made a decision to purchase an item than it would be if someone were merely looking for more information on an item. So showing the form when someone places an item in their basket is better than when they are looking at details, but the best option is to place it at checkout.
People expect that they will have to give you some information at the checkout for you to send them whatever items they are buying and process the transaction. So this is the time where it is the lowest barrier, and where a customer has made the highest commitment to purchase.
You should however not use this as the only way for someone to sign up or log into your site. You should still have buttons to sign up or log in (preferably on the top right) Otherwise you are likely to lose many potential customers that want to sign up or log in but can't work out how.