There would be quite a lot of work involved in this (a shopping cart is effectively a whole new product in itself), but it could be done. If you want to integrate a custom solution tightly with nBill with minimal risk of it breaking when nBill is updated, I would suggest developing the cart system independently but looking up the products, prices etc. from the nBill product tables, then performing a spoof order form submission. You would need an order form set up in nBill with some custom code to apply the appropriate product according to what is passed in by the cart script (ie. manipulating the $orders array as detailed here:
http://www.nbill.co.uk/help/index.php?page=allow-the-user-to-enter-the-amount-to-pay.html). That way you would effectively be fooling nBill into thinking someone had ordered the product(s) using an order form, and it would process as normal - whereas in fact you have used your own script to allow selection of the products.