If you recently got this Javascript code in your Shopify theme files, you may consider removing it.
However, you need to make sure the corresponding tags are being deleted.
Before making any changes, consider securing a backup.
Downloading Shopify theme: https://help.shopify.com/en/manual/online-store/themes/managing-themes/downloading-themes
Malicious code highlighted:
Obfuscated JavaScript code:
//cdn.shopify.com/s/files/1/0644/2975/2553/t/2/assets/option_select.js
2023 update – liquid files infected with hacking code
Resources:
https://community.shopify.com/c/site-speed/store-speed-score-and-document-write/td-p/1290558
https://community.shopify.com/c/site-speed/store-speed-scam-shopify-speed-do-not-match-lighthouse-speed/td-p/1302210