If the whole, fresh chilies are used, put them over a gas flame or heat over charcoal, turning often, until the outsides are well burned or charred, 5 to 7 minutes. Wrap the chilies in a damp cloth and let cool.
Remove the chilies and peel. Discard the stems, veins, and seeds. Cut the chilies into fine shreds. If canned chilies are used, drain and shred them.