The cheapest way is to goto Shenzhen and buy the cheapest plane tickets from the agent but the tickets cannot be changing.
If you have plenty of time, you can also take the train from Hunghom and it is also another much cheaper way than you take the direct flight from HK airport to Shanghai Pudong airport.