How to protect a share portfolio from creditors

I have a share portfolio. I do not want to transfer the shares to a discretionary trust and pay CGT. What is the best way to protect the share portfolio from creditors? I have read online about creating a second mortgage on property using a gift and loan arrangements, but can this work with shares?