Let's go over this Javascript snippet and see what it does:
Shopify = {};
This defines an empty global object called Shopify.
Shopify.shop = {
settings: {"timezone":"(GMT+08:00) Kuala Lumpur","timezone_offset":480,"timezone_abbreviation":"MYT","tzinfo":"Asia\/Kuala_Lumpur","currency":"MYR","money_format":"\u003cspan class=money\u003eRM{{amount}}\u003c\/span\u003e","money_symbol":"RM","money_with_currency_format":"\u003cspan class=money\u003eRM{{amount}}\u003c\/span\u003e","created_at":"2014-08-15T12:19:28+08:00"},
domain: "shop.myshop.com"
};
Here, a member called shop is defined within the object Shopify.
This member is also an object (defined within the curly brackets) that contains two members:
settings - which is also an object that contains the timezone, timezone_offset and some other properties in it.
domain - which is a string that holds a domain name in it.
Shopify.currentUser = {"id":xxxx,"name":"Joe Doe","email":"[email protected]","accountOwner":true,"accountAccess":"Account owner","permissions":["full"],"isEmployee":false};
And this last line also defines a member called currentUser within the global object Shopify and is also an object that contains some properties with information about (most likely) the logged in user.
So basically this whole Javascript code snippet is used to generate an object called Shopify that contains some user information that will be accessible by some script(s) in the page itself.
This code is most likely generated by the page itself, using a server side script that probably has access to this information. When there are Javascript codes in a page that need access to private information, this is usually one of the approaches that are taken in order to achieve this.
Shopify.shopandShopify.currentUserin the rest of the JS code. That'll show you how it's likely being used.