You need to declare the doctype at the top of your page before the initial <html> tag. For example if your page is coded in html 5 then use the following line right at the top of your page.
Warning: If you do not have this already there then this might cause other things on your web page to change.
Paste the following code before the </head> tag in the html on your page.
Paste the following code before the </body> tag in the html on your page changing the storeid from 10000 to your own.
If you are using form based 'Add to Basket' buttons then you must add a hidden field to each form for the minicart parameter as shown below.
You also need to add a target and onsubmit/onclick values as per the examples below.
If you are using hyperlinks then you need to add the minicart=yes parameter as below and also the target and onclick values.
Make sure you use your own storeid and the correct itemcode for your product.
If you have other links on your page which go directly to the cart (not recommended) then add &nck=ok to the end of the querystring.