In api-shop.js, we will add a fetch method to use this read API in the frontend.
mern-marketplace/client/shop/api-shop.js:
const read = (params, credentials) => { return fetch('/api/shop/' + params.shopId, { method: 'GET' }).then((response) => { return response.json() }).catch((err) => console.log(err) )}