I don't know what size ... just the smallest flat head sheet metal screws on the shelf. They're only about 3/16 inches long ... I used a small drill bit (the size of the inner *shaft* of the screw) and drilled through the felt, into the window trim.
The screw gets buried in the felt, so you can't even see it, and if you ever want to replace the felts, it sure makes easy work of it.