Install and activate YITH WooCommerce Compare plugin.
Now you must enable compare button on products. Go to WordPress dashboard -> YIT Plugins -> Compare and enable field “Show button in products list” (this will enable button on products list)
- Link or button – button
- Link/Button text – Compare
- Show button in products list – enable
Some customization options are avilable in Customizer – WooCommerce – Archive/Shop