@Fabio
Simply use hooks so you do not need to modify theme files.
Note that product should be allowed for sale, should have sufficient quantity and owner of listing should be set as seller in eCommerce settings, otherwise add to cart button will not be shown.