Outlet shims, a wire tester, and a screwdriver can all be used to solve this problem. Here is how to fix it DIY, just be sure to follow up with a licensed and insured professional electrician. Switch off the circuit breaker that powers that room. You may turn off the main breaker to stop electricity from running through the house for further security. With a flashlight, be prepared. Make sure there is no power by using the tester. Until you are certain there is no power running, do not proceed.  Remove the outlet’s screws from the wall. Put your outlet shims on the outlet screws. Any gaps between the electrical box and the screws will be filled by the shims. Depending on how close to the electrical box you are, you’ll need to utilize a certain amount of shims. Replace the outlet, tighten it down, and check to see whether it fits snugly. Add more shims if necessary to make it secure if it is still loose. When finished, switch on the breaker.