A dying piglet abandoned in a shelter has been miraculously transformed.