Melt the butter into a soup pot over medium heat. Once melted and frothy, add the shrimp shells and mash them lightly against the side of the pot. Sauté for 6-8 minutes, stirring frequently.
Add the sliced yellow onion, chopped garlic, and minced ginger. Season with salt and pepper and cook, stirring occasionally for an additional 5-7 minutes.
Add the water or stock to the pot and bring to a boil. Reduce heat, cover, and simmer for 25-30 minutes.
After the stock has simmered, turn off the heat and strain into a large bowl through a fine mesh sieve. Discard solids and set the stock aside. Wipe out the pot and return it to the stove.