Model Predictive Control (MPC) can be used to control a system of energy producers and consumers in a Smart Grid. In this paper, we use heat pumps for heating residential buildings with a floor heating system. We use the thermal capacity of the building to shift the energy consumption to periods with low electricity prices. In this way the heating system of the house becomes a flexible power consumer in the Smart Grid. This scenario is relevant for systems with a significant share of stochastic energy producers, e.g. wind turbines, where the ability to shift power consumption according to production is crucial. We present a model for a house with a ground source based heat pump used for supplying thermal energy to a water based floor heating system. The model is a linear state space model and the resulting controller is an Economic MPC formulated as a linear program. The model includes forecasts of both weather and electricity price. Simulation studies demonstrate the capabilities of the proposed model and algorithm. Compared to traditional operation of heat pumps with constant electricity prices, the optimized operating strategy saves 25-35% of the electricity cost.