Disk brake has never worked properly from new, pads replaced - still rubbish!
I suggest first checking that everything is assembled correctly. Make sure the rotor is on the wheel the right way round (it should have arrows in the centre). Download the instructions from Shimano's website and check that everything is in the right place and done up tight (but not too tight!) Or tell us what model you have and ideally post a picture.

Look down at the pads and make sure that they clear the rotor on both sides and that they're parallel to the rotor. Squeeze the lever and make sure they squeeze fairly evenly and with no obvious stiction. If the pads aren't parallelreset the capiler - these directions look fairly useful to me and there's a video (that I haven't watched). Basically, loosen the mounting bolts, squeeze the brake lever, tighten the bolts.