shop = Shop.find_by(shopify_domain: params[:shop]) shop = ShopifyApp::SessionRepository.retrieve(shop.id) ShopifyAPI::Base.activate_session(shop)