According to PetMD, when a dog swallows a foreign object, such as a plastic bag, the best course of action is to monitor the dog closely and determine if it requires immediate care. If the dog seems distressed in any way, it requires veterinary attention right away.
If possible, it is best to prevent dogs from swallowing plastic bags and other foreign objects at all, according to PetMD. Pay attention to what your dog chews on instead of assuming that it is a toy. Remove small items from places where they may tempt the dog, including dirty laundry on the floor or unsafe food items in the garbage can.