You can create magic items based on spells you cannot cast. You must take the appropriate Item Creation Feat and then make a Use magic device check vs. DC 15 + Spell level for
Arcane spells or DC 25 + Spell level for Divine spells.
If the check succeeds, the warlock can create the item as if he had cast the required spell. If it fails, he cannot complete the item. He does not expend the XP or gold cost for making the item; his process is simply slowed. He cannot retry this use magic device check for this spell until he gains a new level.