You can stay for less than 7 days in HK if you go from Singapore. And if your destination is SH, you can buy ticket from Shen Zheng to SH, which is a lot cheaper compared with going from HK directly. If you wanna stay longer in HK, you need to apply a special visa from the embassy which allows you to enter HK multiple times, with less than 15 days each time.