Form checkbox adds a Shopify product to cart

I’m in need of advice. I need to allow a visitor to add a Shopify product to the cart as part of a regular webflow form. Does anyone know if it’s possible to link a checkbox to another button on the page? So when the visitor marks the checkbox, the product is being added to the shopping cart? There must be a way to use Javascript to do that, right?

Thanks!