Your best bet would be to treat the fish in a quarantine/hospital tank. This can be as simple as a 5-10 gallon plastic Tupperware with a sponge filter (and heater if needed). You should also find out what the actual problem is. Melafix doesn't really "cure" much of anything. It makes the tank smell nice and might help with tattered fins. Posting additional details in the unhealthy fish forum is a good place to start to find out what the actual problem is. From there you can move toward the most appropriate treatment for the actual (or most likely) condition so that you get the best results.
Something important for both sick fish AND shrimp is really clean water so either way make sure to keep up on water changes, perhaps more often than usual, with treated (dechlorinated) and temperature matched water.