Personally, if I'm using shop bought GG puree, I add it to the oil before it's too hot and try to evaporate off the liquid before turning the gas up, or it spits everywhere.
To the OP, I either add the dry spices to the oil, making sure that there's enough oil so it doesn't dry out, fry for a few seconds, then add tomato puree, which is effectively making a paste. Or add the tomato puree first, fry in the oil for a minute or so, then adding the spices.
I reckon this is one of the most important parts of the curry making procedure, you need to repeat it a lot, no matter how many times someone explains it to you, just to 'get your eye in'.