Before beginning, generate the code required to implement your button: see here for info (part 1).
Login to your Shopify account.
Go to "Sales channels" > "Online store" > "Pages"
Select a page you want to add the widget to (or click "Add page" button to create a new one).
Click "Show HTML".
Copy and paste the entirety of the code contained in the code generator.
Save, then test your widget.