.shadow files are mainly used in the System Filesystem for configuration data. They are the functional equivalent of Unix symbolic links - a .shadow file is a pointer to another file whose behavior in every respect except its path and file name is the same as the original.

.shadow files are commonly used where only a single instance of an object is needed, but it must exist in multiple folders. For example, an Action is typically declared in the Actions/ folder of the System Filesystem. But the action also needs to appear in menus and toolbars, possibly other places. So, rather than create multiple instances of an action, one .instance file is created in the module's layer file, in the Actions/ folder. Then .shadow files are created in all of the other places the .instance file would be needed, pointing to the .instance file.

Declaring a .shadow file in the system filesystem looks like this:

<folder name="A">
        <file name="com-foo-mymodule-MyClass.instance"/>
     </folder>

     <folder name="B">
        <file name="Shadow1.shadow">
            <attr name="originalFile" 
               stringvalue="A/com-foo-mymodule-MyClass.instance"/>
        </file>
     </folder>

     <folder name="C">
        <file name="anotherShadow.shadow">
            <attr name="originalFile" 
               stringvalue="A/com-foo-mymodule-MyClass.instance"/>
        </file>
     </folder>

.shadow files can point to either files in the system filesystem, or real files on disk. For example, the Favorites tab in the NetBeans IDE uses .shadow files to link to real directories on disk.

Source: NetBeans FAQ