You can follow the google documentation.
https://developers.google.com/recaptcha/intro
Topic summary
Request to add a CAPTCHA to the Shopify “Contact us” page (Habitat theme) to reduce spam. An image was attached, presumably showing a desired CAPTCHA example.
Latest update: A responder recommended using Google reCAPTCHA and linked to Google’s official documentation (developers.google.com/recaptcha/intro). reCAPTCHA is Google’s CAPTCHA solution to help block automated spam.
Status and outcomes:
- No theme-specific or Shopify-specific implementation steps were provided.
- No confirmation of successful setup or resolution.
- Discussion remains open with unanswered details (e.g., how to integrate reCAPTCHA into the Habitat theme’s contact form).