The Player's Handbook General Guidelines and Glossary defines Hit Die/Dice (HD) as follows:
In the singular form, a die rolled to generate hit points. In the plural form, a measure of relative power that is synonymous with character level for the sake of spells, magic items, and magical effects that affect a certain number of Hit Dice of creatures. (309 and emphasis mine)
Thus, in this case, the shadow elf's Hit Dice will equal the shadow elf's total character level.
Lords of Madness on Shadow Creature on Special Qualities, in part, says, "Shadow creatures have an additional special ability for every 4 Hit Dice they possess (minimum of one additional ability)…" (168). Thus, in this case, the shadow elf will have one additional ability from that list at character levels 1–7 and will pick a second special ability at character level 8, a third at character level 12, a fourth at character level 16, and so on. Choose wisely.
Note that in a rules-as-written campaign a shadow elf's effective character level (ECL) is 2 higher than its character level due to the shadow creature template's level adjustment entry of +2. (ECL is used to, among other things, determine how much XP the creature needs to accumulate to attain its next character level and how much gp it should have according to the wealth by level table.) This typically leaves the shadow elf behind on hp, saving throws, skill points, and so on when compared to other PCs, and, in many circles, is considered a bad trade. Consider carefully before picking anything with a level adjustment greater than +0.