You should try to set aside time to make a special trip to the aquarium store when you buy your fish. If you intend to do other errands besides shopping for fish, save the aquarium store for last.
The bags of fish should be taken directly home. The small volume of water in each bag is subject to rapid temperature changes and is easily polluted, and the fish will be under considerable stress.
It has been common advice for years to float the bags in the aquarium for at least 15 minutes to equalize the temperatures of the bags with the tank water. However, because this only increases the stress on the fish, which are already under considerable stress from being netted, bagged, and transported, it is usually better to add the fish as soon as you arrive home.
The only exception is if the water in the aquarium is colder than that in the bags, in which case floating the bags will be necessary.
Some experienced hobbyists do not add the bag water to their tank to avoid the possibility of inadvertently introducing any disease-causing organisms to the aquarium. Instead, they place a large net over a bucket and pour the contents of the bag into it, and then they release the netted fish into the aquarium. Repeat this procedure for each bag and discard the water in the bucket.
Give the fish time to adjust to their new home. The tank lights should remain off for at least several hours. Some species are more prone to hiding than others, but as they become used to their surroundings they will spend more and more time in the open.
Ideally, before adding new fish to an existing tank, the new fish should spend a minimum of two weeks in a quarantine tank. This gives you time to see if they develop any diseases as a result of the stresses involved in getting them home.
The quarantine tank does not have to have gravel or aquascaping, but hiding places should be provided. Small, clean flowerpots broken in half and laid on their sides are excellent for this purpose.
You should also feed established residents just before you finally add the new fish to a community tank. A full stomach will make them less aggressive.