Prep the spinach. If using frozen, allow it to thaw and then squeeze and remove any excess water. If you are using fresh, blanch the spinach into a pot of boiling water and then into ice. Drain the spinach and remove any excess water.
In a skillet over medium-high heat, melt the butter or ghee.
Add the shallot and cook until it starts to soften and get a little caramelized.
Once the onions are almost done, add in the garlic and let it cook a few more minutes, making sure not to let the garlic burn.
Add in the cream cheese and help move it around to break it up, so it starts to melt into the skillet. This is easier if you are using room-temperature cream cheese.
Pour in the heavy cream and whisk until the cream cheese is incorporated and the sauce starts to thicken. You want it to start to coat the back of a spoon before continuing.
Stir in the cheese and whisk until it's melted.
Add the spices and give it one more quick stir.
Finally, add the drained spinach. I always like to give it one more squeeze before adding it to make sure as much water as possible is removed.
Add in any additional cheeses if desired.