Let's describe the algorithm in plain english and you can translate it to code:
To shuffle the list: while the list of things is non-empty, pick a random number between 0 and how many things the list contains. Add the item at that index in things to the end of the result list. Now remove it from things.