How long after you applied it did it scratch? Like a lot of finishes, shellac dries pretty quickly, but takes a while to fully cure.
Also: not applicable to your situation, but the lighter (in color) grades of shellac are processed in a way that means that non-fresh shellac sometimes doesn't dissolve or harden properly.