No, store bought custard is much runnier than pastry cream. Although the flavour will be similar, the overall consistency will be much thinner. Therefore, you will not be able to use this cream as a cake filling.