A bit shorter:
Note 1: unless you use --oneshot as well all packages listed in the file will and end up in your world file
Note 2: unless you use --update or --noreplace (better) packages listed in the file that are already installed will be rebuilt (this may or may not be your intention)
Note 3: with portage-2.2 you can put the file in /etc/portage/sets/ and use `emerge -p @filename` (there are some changes in behavior compared to the method above)