Ideally, drip edge should be installed before the shingles. This allows for proper integration with the roofing system and ensures optimal protection. However, in some cases, it is possible to retrofit drip edge after shingle installation, but it may be more challenging and may require additional sealing measures.