I get undefined error when I try to use window.Shopify.settings.
Another approach I took was to use {{ settings.setting_id }}. In this case, {{ settings.setting_id }} is within a script tag in the theme.liquid file.
The second approach works but it doesn't always update the values on page reload. Therfore, I have to hard code values which isn't ideal.