How can I retrieve the URL of stores using my Shopify theme?

I have develop a Shopify theme I want when someone installs my theme on their store how can I get their shop URL. Please leu us know how can i do it

Hello there

If you’re developing a Shopify theme and want to get the store URL of the store where your theme is installed, you can use the {{ shop.url }} Liquid object.

Here’s an example of how to use it:

  1. In your theme files, create a new file called example.liquid.
  2. In the example.liquid file, add the following code:
{% capture shop_url %}{{ shop.url }}{% endcapture %}

The URL of this store is: {{ shop_url }}

  1. Save the example.liquid file and upload your theme to the Shopify App Store.
  2. When a merchant installs your theme and previews it, they should see the URL of their store displayed on the preview page.